summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorthompsa <thompsa@FreeBSD.org>2007-12-18 07:04:50 +0000
committerthompsa <thompsa@FreeBSD.org>2007-12-18 07:04:50 +0000
commitc0871871ded4b15c21ac453be4899f348fe6cba3 (patch)
tree82dc5dfed852c9728b22c6391af19910e9da342d
parentb7209126971ecb28bf4f6b1bbb24a078b590e35a (diff)
downloadFreeBSD-src-c0871871ded4b15c21ac453be4899f348fe6cba3.zip
FreeBSD-src-c0871871ded4b15c21ac453be4899f348fe6cba3.tar.gz
When the bridge has an address and a packet comes in for it then drop it if the
link has been marked discarding by Spanning Tree. This would cause the bridge to see duplicate packets to itself even if STP has correctly calculated the topology and blocked redundant links. Reported by: trasz Tested by: trasz MFC after: 3 days
-rw-r--r--sys/net/if_bridge.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c
index 4825483..af4cd4e 100644
--- a/sys/net/if_bridge.c
+++ b/sys/net/if_bridge.c
@@ -2118,6 +2118,13 @@ bridge_input(struct ifnet *ifp, struct mbuf *m)
if (memcmp(eh->ether_dhost, IF_LLADDR(bifp),
ETHER_ADDR_LEN) == 0) {
+ /* Block redundant paths to us */
+ if ((bif->bif_flags & IFBIF_STP) &&
+ bif->bif_stp.bp_state == BSTP_IFSTATE_DISCARDING) {
+ BRIDGE_UNLOCK(sc);
+ return (m);
+ }
+
/*
* Filter on the physical interface.
*/
OpenPOWER on IntegriCloud