summaryrefslogtreecommitdiffstats
path: root/net/bridge/br_fdb.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@linux-foundation.org>2007-08-30 22:15:35 -0700
committerDavid S. Miller <davem@davemloft.net>2007-08-30 22:15:35 -0700
commitdf1c0b8468b34628ed12b103804a4576cd9af8bb (patch)
tree415a646ecbec816b1ee415768e25987b91e08129 /net/bridge/br_fdb.c
parentb91ddd843751947e2f81dfc8a86c5c21cbe07158 (diff)
downloadblackbird-op-linux-df1c0b8468b34628ed12b103804a4576cd9af8bb.tar.gz
blackbird-op-linux-df1c0b8468b34628ed12b103804a4576cd9af8bb.zip
[BRIDGE]: Packets leaking out of disabled/blocked ports.
This patch fixes some packet leakage in bridge. The bridging code was allowing forward table entries to be generated even if a device was being blocked. The fix is to not add forwarding database entries unless the port is active. The bug arose as part of the conversion to processing STP frames through normal receive path (in 2.6.17). Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Acked-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge/br_fdb.c')
-rw-r--r--net/bridge/br_fdb.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/bridge/br_fdb.c b/net/bridge/br_fdb.c
index 69b70977f000..eb57502bb264 100644
--- a/net/bridge/br_fdb.c
+++ b/net/bridge/br_fdb.c
@@ -384,6 +384,11 @@ void br_fdb_update(struct net_bridge *br, struct net_bridge_port *source,
if (hold_time(br) == 0)
return;
+ /* ignore packets unless we are using this port */
+ if (!(source->state == BR_STATE_LEARNING ||
+ source->state == BR_STATE_FORWARDING))
+ return;
+
fdb = fdb_find(head, addr);
if (likely(fdb)) {
/* attempt to update an entry for a local interface */
OpenPOWER on IntegriCloud