diff options
author | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2012-03-29 14:15:54 +0000 |
---|---|---|
committer | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2012-03-29 14:15:54 +0000 |
commit | 5ace2c89edaf55572ed96142d23ea3d09531cf2c (patch) | |
tree | 10ae4d8f2f273efb2320048424e98527c6cd65af /target/linux/generic/patches-3.2 | |
parent | 368d4af07e9bbe6db2836b81831b59956d2fb685 (diff) |
kernel: restore ebtables functionality by running netfilter hooks when the ebtables module is loaded
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31141 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/generic/patches-3.2')
-rw-r--r-- | target/linux/generic/patches-3.2/644-bridge_optimize_netfilter_hooks.patch | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/target/linux/generic/patches-3.2/644-bridge_optimize_netfilter_hooks.patch b/target/linux/generic/patches-3.2/644-bridge_optimize_netfilter_hooks.patch index 91139854bb..6c3c3e5c60 100644 --- a/target/linux/generic/patches-3.2/644-bridge_optimize_netfilter_hooks.patch +++ b/target/linux/generic/patches-3.2/644-bridge_optimize_netfilter_hooks.patch @@ -1,12 +1,16 @@ --- a/net/bridge/br_netfilter.c +++ b/net/bridge/br_netfilter.c -@@ -62,6 +62,11 @@ static int brnf_filter_pppoe_tagged __re +@@ -62,6 +62,15 @@ static int brnf_filter_pppoe_tagged __re #define brnf_filter_pppoe_tagged 0 #endif ++int brnf_call_ebtables __read_mostly = 0; ++EXPORT_SYMBOL_GPL(brnf_call_ebtables); ++ +bool br_netfilter_run_hooks(void) +{ -+ return brnf_call_iptables | brnf_call_ip6tables | brnf_call_arptables; ++ return brnf_call_iptables | brnf_call_ip6tables | brnf_call_arptables | ++ brnf_call_ebtables; +} + static inline __be16 vlan_proto(const struct sk_buff *skb) @@ -14,7 +18,11 @@ if (vlan_tx_tag_present(skb)) --- a/net/bridge/br_private.h +++ b/net/bridge/br_private.h -@@ -491,12 +491,25 @@ static inline bool br_multicast_is_route +@@ -488,15 +488,29 @@ static inline bool br_multicast_is_route + + /* br_netfilter.c */ + #ifdef CONFIG_BRIDGE_NETFILTER ++extern int brnf_call_ebtables; extern int br_netfilter_init(void); extern void br_netfilter_fini(void); extern void br_netfilter_rtable_init(struct net_bridge *); @@ -120,3 +128,19 @@ dev_queue_xmit); } +--- a/net/bridge/netfilter/ebtables.c ++++ b/net/bridge/netfilter/ebtables.c +@@ -2399,11 +2399,13 @@ static int __init ebtables_init(void) + } + + printk(KERN_INFO "Ebtables v2.0 registered\n"); ++ brnf_call_ebtables = 1; + return 0; + } + + static void __exit ebtables_fini(void) + { ++ brnf_call_ebtables = 0; + nf_unregister_sockopt(&ebt_sockopts); + xt_unregister_target(&ebt_standard_target); + printk(KERN_INFO "Ebtables v2.0 unregistered\n"); |