diff options
author | Florian Westphal <fw@strlen.de> | 2011-01-11 17:55:51 -0500 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2011-01-11 17:55:51 -0500 |
commit | 2f46e07995734a363608e974a82fd05d5b610750 (patch) | |
tree | 204c3b071e832cf17cefaaab309966f73da3808b /include | |
parent | 13ee6ac579574a2a95e982b19920fd2495dce8cd (diff) |
netfilter: ebtables: make broute table work again
broute table init hook sets up the "br_should_route_hook" pointer,
which then gets called from br_input.
commit a386f99025f13b32502fe5dedf223c20d7283826
(bridge: add proper RCU annotation to should_route_hook)
introduced a typedef, and then changed this to:
br_should_route_hook_t *rhook;
[..]
rhook = rcu_dereference(br_should_route_hook);
if (*rhook(skb))
problem is that "br_should_route_hook" contains the address of the function,
so calling *rhook() results in kernel panic.
Signed-off-by: Florian Westphal <fw@strlen.de>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/if_bridge.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/if_bridge.h b/include/linux/if_bridge.h index f7e73c338c40..dd3f20139640 100644 --- a/include/linux/if_bridge.h +++ b/include/linux/if_bridge.h | |||
@@ -103,7 +103,7 @@ struct __fdb_entry { | |||
103 | 103 | ||
104 | extern void brioctl_set(int (*ioctl_hook)(struct net *, unsigned int, void __user *)); | 104 | extern void brioctl_set(int (*ioctl_hook)(struct net *, unsigned int, void __user *)); |
105 | 105 | ||
106 | typedef int (*br_should_route_hook_t)(struct sk_buff *skb); | 106 | typedef int br_should_route_hook_t(struct sk_buff *skb); |
107 | extern br_should_route_hook_t __rcu *br_should_route_hook; | 107 | extern br_should_route_hook_t __rcu *br_should_route_hook; |
108 | 108 | ||
109 | #endif | 109 | #endif |