aboutsummaryrefslogtreecommitdiffstats
path: root/net/bridge
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2007-11-13 05:58:44 -0500
committerDavid S. Miller <davem@davemloft.net>2007-11-13 05:58:44 -0500
commit81d9ddae856678c45297550e9353c8a5a7fd6438 (patch)
tree7623400b1c2cd42cc1491fa991dbe8313e76bc1c /net/bridge
parent4ce5ba6aecb218981fc76585b6d9a7d0019e61b5 (diff)
[NETFILTER]: bridge: fix double POSTROUTING hook invocation
Packets routed between bridges have the POST_ROUTING hook invoked twice since bridging mistakes them for bridged packets because they have skb->nf_bridge set. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge')
-rw-r--r--net/bridge/br_netfilter.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c
index da22f900e89d..c1757c79dfbb 100644
--- a/net/bridge/br_netfilter.c
+++ b/net/bridge/br_netfilter.c
@@ -766,6 +766,9 @@ static unsigned int br_nf_post_routing(unsigned int hook, struct sk_buff *skb,
766 if (!nf_bridge) 766 if (!nf_bridge)
767 return NF_ACCEPT; 767 return NF_ACCEPT;
768 768
769 if (!(nf_bridge->mask & (BRNF_BRIDGED | BRNF_BRIDGED_DNAT)))
770 return NF_ACCEPT;
771
769 if (!realoutdev) 772 if (!realoutdev)
770 return NF_DROP; 773 return NF_DROP;
771 774