aboutsummaryrefslogtreecommitdiffstats
path: root/net/bridge/br_if.c
diff options
context:
space:
mode:
authorAji Srinivas <emc.com>2007-03-07 19:10:53 -0500
committerDavid S. Miller <davem@davemloft.net>2007-03-07 19:10:53 -0500
commitde79059ecd7cd650f3788ece978a64586921d1f1 (patch)
treed243e26bd799242ddd681e04311f70e40070a4b8 /net/bridge/br_if.c
parentc7ababbdc647e67e953d153ddf62cbdc9fe3297e (diff)
[BRIDGE]: adding new device to bridge should enable if up
One change introduced by the workqueue removal patch is that adding an interface that is up to a bridge which is also up does not ever call br_stp_enable_port(), leaving the port in DISABLED state until we do ifconfig down and up or link events occur. The following patch to the br_add_if function fixes it. This is a regression introduced in 2.6.21. Submitted-by: Aji_Srinivas@emc.com Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge/br_if.c')
-rw-r--r--net/bridge/br_if.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c
index 6845a258408f..f3a2e29be40c 100644
--- a/net/bridge/br_if.c
+++ b/net/bridge/br_if.c
@@ -428,6 +428,10 @@ int br_add_if(struct net_bridge *br, struct net_device *dev)
428 spin_lock_bh(&br->lock); 428 spin_lock_bh(&br->lock);
429 br_stp_recalculate_bridge_id(br); 429 br_stp_recalculate_bridge_id(br);
430 br_features_recompute(br); 430 br_features_recompute(br);
431
432 if ((dev->flags & IFF_UP) && netif_carrier_ok(dev) &&
433 (br->dev->flags & IFF_UP))
434 br_stp_enable_port(p);
431 spin_unlock_bh(&br->lock); 435 spin_unlock_bh(&br->lock);
432 436
433 dev_set_mtu(br->dev, br_min_mtu(br)); 437 dev_set_mtu(br->dev, br_min_mtu(br));