Skip to content

Commit

Permalink
netfilter: ebtables: make broute table work again
Browse files Browse the repository at this point in the history
broute table init hook sets up the "br_should_route_hook" pointer,
which then gets called from br_input.

commit a386f99
(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>
  • Loading branch information
Florian Westphal authored and Pablo Neira Ayuso committed Jan 11, 2011
1 parent 13ee6ac commit 2f46e07
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/linux/if_bridge.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ struct __fdb_entry {

extern void brioctl_set(int (*ioctl_hook)(struct net *, unsigned int, void __user *));

typedef int (*br_should_route_hook_t)(struct sk_buff *skb);
typedef int br_should_route_hook_t(struct sk_buff *skb);
extern br_should_route_hook_t __rcu *br_should_route_hook;

#endif
Expand Down

0 comments on commit 2f46e07

Please sign in to comment.