David Miller
2007-Apr-18 17:23 UTC
[Bridge] [PATCH] bridge: adding new device to bridge should enable if up
From: Stephen Hemminger <shemminger@linux-foundation.org> Date: Wed, 7 Mar 2007 16:03:55 -0800> 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>Applied, but:> + if ((dev->flags & IFF_UP) && netif_carrier_ok(dev) && > + (br->dev->flags & IFF_UP))I had to fix up the trailing whitespace on that second line. Please use "git apply --check --whitespace=error-all" or similar to validate the patches you send me. Thanks.
Hello, I have a question regarding brctl and br2684, I have a network scenrio where I have to add br2684-rt into a bridge. but I could not do so with brctl, please let me if you have any suggestion on the issue. My scenario : (vpi/vci) 192.168.2.16 0/32 nas0 DSLAM1 (BR2684-rt) --------------|----------------- 192.168.3.26 0/33 | | 192.168.1.18 DSLAM 2(BR2684-rt) --------------| nas1 (LINUX) Eth0 -----------------PC1 (OAM) 192.168.4.36 0/34 | | DSLAM 3(BR2684-rt) --------------|nas2------------ I want to put nas0, nas1, nas2 and eth0 on a bridge so that PC1 is able to communicate with DSLAMS. Note that we do not want to assign any IP on nas0, nas1 and nas2. Please help with your suggestion. HAI -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.linux-foundation.org/pipermail/bridge/attachments/20070307/44d3dde3/attachment-0002.htm
Stephen Hemminger
2007-Apr-18 17:23 UTC
[Bridge] [PATCH] 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> 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));