[Bridge] [PATCH] bridge: Relay bridge multicast pkgs if !STP
Joakim Tjernlund
Joakim.Tjernlund at transmode.se
Tue May 12 10:34:32 PDT 2009
Currently the bridge drops all STP pkgs when
STP is off. This makes the bridge relay the Bridge Group
multicast address, 01:80:c2:00:00:00, when STP is off.
This allows for loop detection by other bridges doing STP.
Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund at transmode.se>
---
V2:
- Use compare_ether_address()
- Invert if logic, hopefully easier to read?
net/bridge/br_input.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/net/bridge/br_input.c b/net/bridge/br_input.c
index 30b8877..0bd175c 100644
--- a/net/bridge/br_input.c
+++ b/net/bridge/br_input.c
@@ -137,7 +137,9 @@ struct sk_buff *br_handle_frame(struct net_bridge_port *p, struct sk_buff *skb)
if (NF_HOOK(PF_BRIDGE, NF_BR_LOCAL_IN, skb, skb->dev,
NULL, br_handle_local_finish))
return NULL; /* frame consumed by filter */
- else
+ /* Relay Bridge Group address if STP is off */
+ if (p->br->stp_enabled != BR_NO_STP ||
+ compare_ether_addr(dest, br_group_address))
return skb; /* continue processing */
}
--
1.6.2.3
More information about the Bridge
mailing list