bridge: master device stuck in no-carrier state forever when in user-stp mode
authorVitalii Demianets <vitas@nppfactor.kiev.ua>
Fri, 25 Nov 2011 00:16:37 +0000 (00:16 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 1 Dec 2011 19:05:17 +0000 (14:05 -0500)
commitb03b6dd58cef7d15b7c46a6729b83dd535ef08ab
treea193461397942346f330b782a200849feafa1991
parentefbc368dcc6426d5430b9b8eeda944cf2cb74b8c
bridge: master device stuck in no-carrier state forever when in user-stp mode

When in user-stp mode, bridge master do not follow state of its slaves, so
after the following sequence of events it can stuck forever in no-carrier
state:
1) turn stp off
2) put all slaves down - master device will follow their state and also go in
no-carrier state
3) turn stp on with bridge-stp script returning 0 (go to the user-stp mode)
Now bridge master won't follow slaves' state and will never reach running
state.

This patch solves the problem by making user-stp and kernel-stp behavior
similar regarding master following slaves' states.

Signed-off-by: Vitalii Demianets <vitas@nppfactor.kiev.ua>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/br_netlink.c
net/bridge/br_stp.c