bridge: fix hello and hold timers starting/stopping
authorIvan Vecera <cera@cera.cz>
Fri, 19 May 2017 17:30:43 +0000 (19:30 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 22 May 2017 18:40:22 +0000 (14:40 -0400)
commitbd080488a6cfd37135becedfdc87643b139c2345
treeb3ec5d73cf9895423e5e75cd7985821d0c0a65be
parent85deed56032b6c98b541895bfda9bdd74f6ed987
bridge: fix hello and hold timers starting/stopping

Current bridge code incorrectly handles starting/stopping of hello and
hold timers during STP enable/disable.

1. Timers are stopped in br_stp_start() during NO_STP->USER_STP
   transition. The timers are already stopped in NO_STP state so
   this is confusing no-op.

2. During USER_STP->NO_STP transition the timers are started. This
   does not make sense and is confusion because the timer should not be
   active in NO_STP state.

Cc: davem@davemloft.net
Cc: sashok@cumulusnetworks.com
Cc: stephen@networkplumber.org
Cc: bridge@lists.linux-foundation.org
Cc: lucien.xin@gmail.com
Cc: nikolay@cumulusnetworks.com
Signed-off-by: Ivan Vecera <cera@cera.cz>
Reviewed-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/br_stp_if.c