]> git.baikalelectronics.ru Git - kernel.git/commit
net: bridge: start hello timer only if device is up
authorNikolay Aleksandrov <nikolay@cumulusnetworks.com>
Thu, 1 Jun 2017 15:07:55 +0000 (18:07 +0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 1 Jun 2017 16:28:31 +0000 (12:28 -0400)
commitb46d63048f169f980e6bccd0e5feed0bca463ad6
tree898aba11ad199bfd79b86c0f1bd62639abdfb7ec
parenta67eadedc7a4dc420f3c20005f99e0d4448c56bb
net: bridge: start hello timer only if device is up

When the transition of NO_STP -> KERNEL_STP was fixed by always calling
mod_timer in br_stp_start, it introduced a new regression which causes
the timer to be armed even when the bridge is down, and since we stop
the timers in its ndo_stop() function, they never get disabled if the
device is destroyed before it's upped.

To reproduce:
$ while :; do ip l add br0 type bridge hello_time 100; brctl stp br0 on;
ip l del br0; done;

CC: Xin Long <lucien.xin@gmail.com>
CC: Ivan Vecera <cera@cera.cz>
CC: Sebastian Ott <sebott@linux.vnet.ibm.com>
Reported-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Fixes: 67b8632cfbad ("bridge: start hello_timer when enabling KERNEL_STP in br_stp_start")
Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/br_stp_if.c