diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2009-05-15 02:10:13 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-05-18 00:12:54 -0400 |
commit | a598f6aebea2481531b0757ed90cfb0d8cf1d8f5 (patch) | |
tree | 8e1b255bf66b68c01e784a0e4b3e3179945bd3d2 /net/bridge | |
parent | a8f492c6ac6072d6c5bce4b2f13dc44612991051 (diff) |
bridge: relay bridge multicast pkgs if !STP
Currently the bridge catches all STP packets; even if STP is turned
off. This prevents other systems (which do have STP turned on)
from being able to detect loops in the network.
With this patch, if STP is off, then any packet sent to the STP
multicast group address is forwarded to all ports.
Based on earlier patch by Joakim Tjernlund with changes
to go through forwarding (not local chain), and optimization
that only last octet needs to be checked.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge')
-rw-r--r-- | net/bridge/br_input.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/bridge/br_input.c b/net/bridge/br_input.c index 30b88777c3df..5ee1a3682bf2 100644 --- a/net/bridge/br_input.c +++ b/net/bridge/br_input.c | |||
@@ -134,6 +134,10 @@ struct sk_buff *br_handle_frame(struct net_bridge_port *p, struct sk_buff *skb) | |||
134 | if (skb->protocol == htons(ETH_P_PAUSE)) | 134 | if (skb->protocol == htons(ETH_P_PAUSE)) |
135 | goto drop; | 135 | goto drop; |
136 | 136 | ||
137 | /* If STP is turned off, then forward */ | ||
138 | if (p->br->stp_enabled == BR_NO_STP && dest[5] == 0) | ||
139 | goto forward; | ||
140 | |||
137 | if (NF_HOOK(PF_BRIDGE, NF_BR_LOCAL_IN, skb, skb->dev, | 141 | if (NF_HOOK(PF_BRIDGE, NF_BR_LOCAL_IN, skb, skb->dev, |
138 | NULL, br_handle_local_finish)) | 142 | NULL, br_handle_local_finish)) |
139 | return NULL; /* frame consumed by filter */ | 143 | return NULL; /* frame consumed by filter */ |
@@ -141,6 +145,7 @@ struct sk_buff *br_handle_frame(struct net_bridge_port *p, struct sk_buff *skb) | |||
141 | return skb; /* continue processing */ | 145 | return skb; /* continue processing */ |
142 | } | 146 | } |
143 | 147 | ||
148 | forward: | ||
144 | switch (p->state) { | 149 | switch (p->state) { |
145 | case BR_STATE_FORWARDING: | 150 | case BR_STATE_FORWARDING: |
146 | rhook = rcu_dereference(br_should_route_hook); | 151 | rhook = rcu_dereference(br_should_route_hook); |