Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 112117
b: refs/heads/master
c: 043ef46
h: refs/heads/master
i:
  112115: a14ebd5
v: v3
  • Loading branch information
Jan Engelhardt authored and Patrick McHardy committed Oct 8, 2008
1 parent c9849c3 commit 8dde157
Show file tree
Hide file tree
Showing 23 changed files with 159 additions and 194 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2d06d4a5cc107046508d860a0b47dbc43b829b79
refs/heads/master: 043ef46c7690bfdbd5b012e15812a14a19ca5604
6 changes: 3 additions & 3 deletions trunk/include/linux/netfilter_bridge/ebtables.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ struct ebt_entry_match
{
union {
char name[EBT_FUNCTION_MAXNAMELEN];
struct ebt_match *match;
struct xt_match *match;
} u;
/* size of data */
unsigned int match_size;
Expand All @@ -135,7 +135,7 @@ struct ebt_entry_watcher
{
union {
char name[EBT_FUNCTION_MAXNAMELEN];
struct ebt_watcher *watcher;
struct xt_target *watcher;
} u;
/* size of data */
unsigned int watcher_size;
Expand All @@ -146,7 +146,7 @@ struct ebt_entry_target
{
union {
char name[EBT_FUNCTION_MAXNAMELEN];
struct ebt_target *target;
struct xt_target *target;
} u;
/* size of data */
unsigned int target_size;
Expand Down
1 change: 1 addition & 0 deletions trunk/net/bridge/netfilter/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ menu "Bridge: Netfilter Configuration"

config BRIDGE_NF_EBTABLES
tristate "Ethernet Bridge tables (ebtables) support"
select NETFILTER_XTABLES
help
ebtables is a general, extensible frame/packet identification
framework. Say 'Y' or 'M' here if you want to do Ethernet
Expand Down
8 changes: 4 additions & 4 deletions trunk/net/bridge/netfilter/ebt_802_3.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ ebt_802_3_mt_check(const char *table, const void *entry,
return true;
}

static struct ebt_match filter_802_3 __read_mostly = {
.name = EBT_802_3_MATCH,
static struct xt_match ebt_802_3_mt_reg __read_mostly = {
.name = "802_3",
.revision = 0,
.family = NFPROTO_BRIDGE,
.match = ebt_802_3_mt,
Expand All @@ -63,12 +63,12 @@ static struct ebt_match filter_802_3 __read_mostly = {

static int __init ebt_802_3_init(void)
{
return ebt_register_match(&filter_802_3);
return xt_register_match(&ebt_802_3_mt_reg);
}

static void __exit ebt_802_3_fini(void)
{
ebt_unregister_match(&filter_802_3);
xt_unregister_match(&ebt_802_3_mt_reg);
}

module_init(ebt_802_3_init);
Expand Down
14 changes: 7 additions & 7 deletions trunk/net/bridge/netfilter/ebt_among.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
* August, 2003
*
*/

#include <linux/netfilter_bridge/ebtables.h>
#include <linux/netfilter_bridge/ebt_among.h>
#include <linux/ip.h>
#include <linux/if_arp.h>
#include <linux/module.h>
#include <linux/netfilter/x_tables.h>
#include <linux/netfilter_bridge/ebtables.h>
#include <linux/netfilter_bridge/ebt_among.h>

static bool ebt_mac_wormhash_contains(const struct ebt_mac_wormhash *wh,
const char *mac, __be32 ip)
Expand Down Expand Up @@ -211,8 +211,8 @@ ebt_among_mt_check(const char *table, const void *entry,
return true;
}

static struct ebt_match filter_among __read_mostly = {
.name = EBT_AMONG_MATCH,
static struct xt_match ebt_among_mt_reg __read_mostly = {
.name = "among",
.revision = 0,
.family = NFPROTO_BRIDGE,
.match = ebt_among_mt,
Expand All @@ -223,12 +223,12 @@ static struct ebt_match filter_among __read_mostly = {

static int __init ebt_among_init(void)
{
return ebt_register_match(&filter_among);
return xt_register_match(&ebt_among_mt_reg);
}

static void __exit ebt_among_fini(void)
{
ebt_unregister_match(&filter_among);
xt_unregister_match(&ebt_among_mt_reg);
}

module_init(ebt_among_init);
Expand Down
8 changes: 4 additions & 4 deletions trunk/net/bridge/netfilter/ebt_arp.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ ebt_arp_mt_check(const char *table, const void *entry,
return true;
}

static struct ebt_match filter_arp __read_mostly = {
.name = EBT_ARP_MATCH,
static struct xt_match ebt_arp_mt_reg __read_mostly = {
.name = "arp",
.revision = 0,
.family = NFPROTO_BRIDGE,
.match = ebt_arp_mt,
Expand All @@ -131,12 +131,12 @@ static struct ebt_match filter_arp __read_mostly = {

static int __init ebt_arp_init(void)
{
return ebt_register_match(&filter_arp);
return xt_register_match(&ebt_arp_mt_reg);
}

static void __exit ebt_arp_fini(void)
{
ebt_unregister_match(&filter_arp);
xt_unregister_match(&ebt_arp_mt_reg);
}

module_init(ebt_arp_init);
Expand Down
8 changes: 4 additions & 4 deletions trunk/net/bridge/netfilter/ebt_arpreply.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ ebt_arpreply_tg_check(const char *tablename, const void *entry,
return true;
}

static struct ebt_target reply_target __read_mostly = {
.name = EBT_ARPREPLY_TARGET,
static struct xt_target ebt_arpreply_tg_reg __read_mostly = {
.name = "arpreply",
.revision = 0,
.family = NFPROTO_BRIDGE,
.target = ebt_arpreply_tg,
Expand All @@ -90,12 +90,12 @@ static struct ebt_target reply_target __read_mostly = {

static int __init ebt_arpreply_init(void)
{
return ebt_register_target(&reply_target);
return xt_register_target(&ebt_arpreply_tg_reg);
}

static void __exit ebt_arpreply_fini(void)
{
ebt_unregister_target(&reply_target);
xt_unregister_target(&ebt_arpreply_tg_reg);
}

module_init(ebt_arpreply_init);
Expand Down
8 changes: 4 additions & 4 deletions trunk/net/bridge/netfilter/ebt_dnat.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ ebt_dnat_tg_check(const char *tablename, const void *entry,
return true;
}

static struct ebt_target dnat __read_mostly = {
.name = EBT_DNAT_TARGET,
static struct xt_target ebt_dnat_tg_reg __read_mostly = {
.name = "dnat",
.revision = 0,
.family = NFPROTO_BRIDGE,
.target = ebt_dnat_tg,
Expand All @@ -59,12 +59,12 @@ static struct ebt_target dnat __read_mostly = {

static int __init ebt_dnat_init(void)
{
return ebt_register_target(&dnat);
return xt_register_target(&ebt_dnat_tg_reg);
}

static void __exit ebt_dnat_fini(void)
{
ebt_unregister_target(&dnat);
xt_unregister_target(&ebt_dnat_tg_reg);
}

module_init(ebt_dnat_init);
Expand Down
8 changes: 4 additions & 4 deletions trunk/net/bridge/netfilter/ebt_ip.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ ebt_ip_mt_check(const char *table, const void *entry,
return true;
}

static struct ebt_match filter_ip __read_mostly = {
.name = EBT_IP_MATCH,
static struct xt_match ebt_ip_mt_reg __read_mostly = {
.name = "ip",
.revision = 0,
.family = NFPROTO_BRIDGE,
.match = ebt_ip_mt,
Expand All @@ -121,12 +121,12 @@ static struct ebt_match filter_ip __read_mostly = {

static int __init ebt_ip_init(void)
{
return ebt_register_match(&filter_ip);
return xt_register_match(&ebt_ip_mt_reg);
}

static void __exit ebt_ip_fini(void)
{
ebt_unregister_match(&filter_ip);
xt_unregister_match(&ebt_ip_mt_reg);
}

module_init(ebt_ip_init);
Expand Down
9 changes: 4 additions & 5 deletions trunk/net/bridge/netfilter/ebt_ip6.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,8 @@ ebt_ip6_mt_check(const char *table, const void *entry,
return true;
}

static struct ebt_match filter_ip6 =
{
.name = EBT_IP6_MATCH,
static struct xt_match ebt_ip6_mt_reg __read_mostly = {
.name = "ip6",
.revision = 0,
.family = NFPROTO_BRIDGE,
.match = ebt_ip6_mt,
Expand All @@ -134,12 +133,12 @@ static struct ebt_match filter_ip6 =

static int __init ebt_ip6_init(void)
{
return ebt_register_match(&filter_ip6);
return xt_register_match(&ebt_ip6_mt_reg);
}

static void __exit ebt_ip6_fini(void)
{
ebt_unregister_match(&filter_ip6);
xt_unregister_match(&ebt_ip6_mt_reg);
}

module_init(ebt_ip6_init);
Expand Down
8 changes: 4 additions & 4 deletions trunk/net/bridge/netfilter/ebt_limit.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ ebt_limit_mt_check(const char *table, const void *e,
return true;
}

static struct ebt_match ebt_limit_reg __read_mostly = {
.name = EBT_LIMIT_MATCH,
static struct xt_match ebt_limit_mt_reg __read_mostly = {
.name = "limit",
.revision = 0,
.family = NFPROTO_BRIDGE,
.match = ebt_limit_mt,
Expand All @@ -101,12 +101,12 @@ static struct ebt_match ebt_limit_reg __read_mostly = {

static int __init ebt_limit_init(void)
{
return ebt_register_match(&ebt_limit_reg);
return xt_register_match(&ebt_limit_mt_reg);
}

static void __exit ebt_limit_fini(void)
{
ebt_unregister_match(&ebt_limit_reg);
xt_unregister_match(&ebt_limit_mt_reg);
}

module_init(ebt_limit_init);
Expand Down
9 changes: 4 additions & 5 deletions trunk/net/bridge/netfilter/ebt_log.c
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,8 @@ ebt_log_tg(struct sk_buff *skb, const struct net_device *in,
return EBT_CONTINUE;
}

static struct ebt_watcher log =
{
.name = EBT_LOG_WATCHER,
static struct xt_target ebt_log_tg_reg __read_mostly = {
.name = "log",
.revision = 0,
.family = NFPROTO_BRIDGE,
.target = ebt_log_tg,
Expand All @@ -236,7 +235,7 @@ static int __init ebt_log_init(void)
{
int ret;

ret = ebt_register_watcher(&log);
ret = xt_register_target(&ebt_log_tg_reg);
if (ret < 0)
return ret;
nf_log_register(NFPROTO_BRIDGE, &ebt_log_logger);
Expand All @@ -246,7 +245,7 @@ static int __init ebt_log_init(void)
static void __exit ebt_log_fini(void)
{
nf_log_unregister(&ebt_log_logger);
ebt_unregister_watcher(&log);
xt_unregister_target(&ebt_log_tg_reg);
}

module_init(ebt_log_init);
Expand Down
8 changes: 4 additions & 4 deletions trunk/net/bridge/netfilter/ebt_mark.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ ebt_mark_tg_check(const char *table, const void *e,
return true;
}

static struct ebt_target mark_target __read_mostly = {
.name = EBT_MARK_TARGET,
static struct xt_target ebt_mark_tg_reg __read_mostly = {
.name = "mark",
.revision = 0,
.family = NFPROTO_BRIDGE,
.target = ebt_mark_tg,
Expand All @@ -71,12 +71,12 @@ static struct ebt_target mark_target __read_mostly = {

static int __init ebt_mark_init(void)
{
return ebt_register_target(&mark_target);
return xt_register_target(&ebt_mark_tg_reg);
}

static void __exit ebt_mark_fini(void)
{
ebt_unregister_target(&mark_target);
xt_unregister_target(&ebt_mark_tg_reg);
}

module_init(ebt_mark_init);
Expand Down
8 changes: 4 additions & 4 deletions trunk/net/bridge/netfilter/ebt_mark_m.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ ebt_mark_mt_check(const char *table, const void *e,
return true;
}

static struct ebt_match filter_mark __read_mostly = {
.name = EBT_MARK_MATCH,
static struct xt_match ebt_mark_mt_reg __read_mostly = {
.name = "mark_m",
.revision = 0,
.family = NFPROTO_BRIDGE,
.match = ebt_mark_mt,
Expand All @@ -52,12 +52,12 @@ static struct ebt_match filter_mark __read_mostly = {

static int __init ebt_mark_m_init(void)
{
return ebt_register_match(&filter_mark);
return xt_register_match(&ebt_mark_mt_reg);
}

static void __exit ebt_mark_m_fini(void)
{
ebt_unregister_match(&filter_mark);
xt_unregister_match(&ebt_mark_mt_reg);
}

module_init(ebt_mark_m_init);
Expand Down
16 changes: 8 additions & 8 deletions trunk/net/bridge/netfilter/ebt_nflog.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,24 +49,24 @@ ebt_nflog_tg_check(const char *table, const void *e,
return true;
}

static struct ebt_watcher nflog __read_mostly = {
.name = EBT_NFLOG_WATCHER,
.revision = 0,
.family = NFPROTO_BRIDGE,
.target = ebt_nflog_tg,
static struct xt_target ebt_nflog_tg_reg __read_mostly = {
.name = "nflog",
.revision = 0,
.family = NFPROTO_BRIDGE,
.target = ebt_nflog_tg,
.checkentry = ebt_nflog_tg_check,
.targetsize = XT_ALIGN(sizeof(struct ebt_nflog_info)),
.me = THIS_MODULE,
.me = THIS_MODULE,
};

static int __init ebt_nflog_init(void)
{
return ebt_register_watcher(&nflog);
return xt_register_target(&ebt_nflog_tg_reg);
}

static void __exit ebt_nflog_fini(void)
{
ebt_unregister_watcher(&nflog);
xt_unregister_target(&ebt_nflog_tg_reg);
}

module_init(ebt_nflog_init);
Expand Down
Loading

0 comments on commit 8dde157

Please sign in to comment.