Signed-off-by: Vasily Averin <vvs@xxxxxxxxxx> --- net/bridge/br_netfilter.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c index ed3b6ce..f4b6b43 100644 --- a/net/bridge/br_netfilter.c +++ b/net/bridge/br_netfilter.c @@ -71,10 +71,9 @@ static inline struct brnf_net *brnf_net(const struct net *net) { return net_generic(net, brnf_net_id); } -#endif -#ifdef CONFIG_SYSCTL -#define brnf_flag(skb, flag) init_brnf_net.flag +#define skb_netns(skb) dev_net((skb)->dev) +#define brnf_flag(skb, flag) brnf_net(skb_netns(skb))->flag #else #define brnf_flag(skb, flag) brnf_##flag #endif @@ -1086,6 +1085,9 @@ static int brnf_sysctl_net_register(struct brnf_net *bn) if (!table) goto err_alloc; } + for (i = 0; table[i].data; i++) + table[i].data += (char *)bn - (char *)&init_brnf_net; + hdr = register_net_sysctl(bn->net, "net/bridge", table); if (!hdr) goto err_reg; -- 1.7.5.4 -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html