From: David S. Miller Date: Sat, 3 Jul 2010 05:42:06 +0000 (-0700) Subject: Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-next-2.6 X-Git-Url: http://rtime.felk.cvut.cz/gitweb/lisovros/linux_canprio.git/commitdiff_plain/e490c1defec4236a6a131fe2d13bf7ba787c02f8 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-next-2.6 --- e490c1defec4236a6a131fe2d13bf7ba787c02f8 diff --cc net/bridge/br_netfilter.c index 84060bc48f1,f1d49ae2341..9fdf1b116bd --- a/net/bridge/br_netfilter.c +++ b/net/bridge/br_netfilter.c @@@ -550,12 -554,16 +555,16 @@@ static unsigned int br_nf_pre_routing(u if (unlikely(!pskb_may_pull(skb, len))) goto out; - p = rcu_dereference(in->br_port); ++ p = br_port_get_rcu(in); + if (p == NULL) + goto out; + br = p->br; + if (skb->protocol == htons(ETH_P_IPV6) || IS_VLAN_IPV6(skb) || IS_PPPOE_IPV6(skb)) { - #ifdef CONFIG_SYSCTL - if (!brnf_call_ip6tables) + if (!brnf_call_ip6tables && !br->nf_call_ip6tables) return NF_ACCEPT; - #endif + nf_bridge_pull_encap_header_rcsum(skb); return br_nf_pre_routing_ipv6(hook, skb, in, out, okfn); } @@@ -715,12 -722,17 +723,17 @@@ static unsigned int br_nf_forward_arp(u const struct net_device *out, int (*okfn)(struct sk_buff *)) { + struct net_bridge_port *p; + struct net_bridge *br; struct net_device **d = (struct net_device **)(skb->cb); - #ifdef CONFIG_SYSCTL - if (!brnf_call_arptables) - p = rcu_dereference(out->br_port); ++ p = br_port_get_rcu(out); + if (p == NULL) + return NF_ACCEPT; + br = p->br; + + if (!brnf_call_arptables && !br->nf_call_arptables) return NF_ACCEPT; - #endif if (skb->protocol != htons(ETH_P_ARP)) { if (!IS_VLAN_ARP(skb))