diff options
author | Stephen Hemminger <shemminger@linux-foundation.org> | 2007-04-26 01:07:58 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:30:02 -0400 |
commit | c2886d6259b8faac4c05ffd9c3c401ac84478de0 (patch) | |
tree | 88bcce1789b029334f9a19db8e78f79d5f8fc808 /net | |
parent | 2111f8b9e58fd04b87b8b07d66485f255a57b0bb (diff) |
[BRIDGE]: if no STP then forward all BPDUs
If a bridge is not running STP, then it has no way to detect a cycle
in the network. But if it is not running STP and some other machine
or device is running STP, then if STP BPDU's get forwarded to it can
detect the cycle.
This is how the old 2.4 and early 2.6 code worked.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/bridge/br_input.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/net/bridge/br_input.c b/net/bridge/br_input.c index 5662567c8aed..420bbb9955e9 100644 --- a/net/bridge/br_input.c +++ b/net/bridge/br_input.c | |||
@@ -136,8 +136,14 @@ struct sk_buff *br_handle_frame(struct net_bridge_port *p, struct sk_buff *skb) | |||
136 | if (skb->protocol == htons(ETH_P_PAUSE)) | 136 | if (skb->protocol == htons(ETH_P_PAUSE)) |
137 | goto drop; | 137 | goto drop; |
138 | 138 | ||
139 | return (NF_HOOK(PF_BRIDGE, NF_BR_LOCAL_IN, skb, skb->dev, | 139 | /* Process STP BPDU's through normal netif_receive_skb() path */ |
140 | NULL, br_handle_local_finish) == 0) ? skb : NULL; | 140 | if (p->br->stp_enabled != BR_NO_STP) { |
141 | if (NF_HOOK(PF_BRIDGE, NF_BR_LOCAL_IN, skb, skb->dev, | ||
142 | NULL, br_handle_local_finish)) | ||
143 | return NULL; | ||
144 | else | ||
145 | return skb; | ||
146 | } | ||
141 | } | 147 | } |
142 | 148 | ||
143 | switch (p->state) { | 149 | switch (p->state) { |