Netdev List
 help / color / mirror / Atom feed
* [PATCH] bridge: adding new device to bridge should enable if up
@ 2007-03-08  0:03 Stephen Hemminger
  2007-03-08  0:12 ` David Miller
  2007-03-08  3:30 ` brctl issue Hai Wang
  0 siblings, 2 replies; 4+ messages in thread
From: Stephen Hemminger @ 2007-03-08  0:03 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, bridge

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>

diff -Naur a/net/bridge/br_if.c b/net/bridge/br_if.c
--- a/net/bridge/br_if.c	2007-02-28 15:34:38.000000000 +0530
+++ b/net/bridge/br_if.c	2007-03-08 01:49:20.000000000 +0530
@@ -428,6 +428,10 @@
 	spin_lock_bh(&br->lock);
 	br_stp_recalculate_bridge_id(br);
 	br_features_recompute(br);
+
+	if ((dev->flags & IFF_UP) && netif_carrier_ok(dev) &&
+	    (br->dev->flags & IFF_UP)) 
+		br_stp_enable_port(p);
 	spin_unlock_bh(&br->lock);
 
 	dev_set_mtu(br->dev, br_min_mtu(br));


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-03-08 21:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-08  0:03 [PATCH] bridge: adding new device to bridge should enable if up Stephen Hemminger
2007-03-08  0:12 ` David Miller
2007-03-08  3:30 ` brctl issue Hai Wang
2007-03-08 21:14   ` Stephen Hemminger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox