Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit de79059e authored by Aji Srinivas's avatar Aji Srinivas Committed by David S. Miller
Browse files

[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: default avatar <Aji_Srinivas@emc.com>
Signed-off-by: default avatarStephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c7ababbd
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -428,6 +428,10 @@ int br_add_if(struct net_bridge *br, struct net_device *dev)
	spin_lock_bh(&br->lock);
	spin_lock_bh(&br->lock);
	br_stp_recalculate_bridge_id(br);
	br_stp_recalculate_bridge_id(br);
	br_features_recompute(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);
	spin_unlock_bh(&br->lock);


	dev_set_mtu(br->dev, br_min_mtu(br));
	dev_set_mtu(br->dev, br_min_mtu(br));