]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
bridge: start hello_timer when enabling KERNEL_STP in br_stp_start
authorXin Long <lucien.xin@gmail.com>
Fri, 19 May 2017 14:20:29 +0000 (22:20 +0800)
committerThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Tue, 27 Jun 2017 13:16:15 +0000 (10:16 -0300)
commita8789bd3893b40a30ce90cef37382b322ea4641f
treefea1a00849647b3ac8e9c8f6c11a7ef7d5499d2c
parent24e99e4fa1d44f835187ce0ba2730292ed13bbbe
bridge: start hello_timer when enabling KERNEL_STP in br_stp_start

BugLink: http://bugs.launchpad.net/bugs/1697001
[ Upstream commit 6d18c732b95c0a9d35e9f978b4438bba15412284 ]

Since commit 76b91c32dd86 ("bridge: stp: when using userspace stp stop
kernel hello and hold timers"), bridge would not start hello_timer if
stp_enabled is not KERNEL_STP when br_dev_open.

The problem is even if users set stp_enabled with KERNEL_STP later,
the timer will still not be started. It causes that KERNEL_STP can
not really work. Users have to re-ifup the bridge to avoid this.

This patch is to fix it by starting br->hello_timer when enabling
KERNEL_STP in br_stp_start.

As an improvement, it's also to start hello_timer again only when
br->stp_enabled is KERNEL_STP in br_hello_timer_expired, there is
no reason to start the timer again when it's NO_STP.

Fixes: 76b91c32dd86 ("bridge: stp: when using userspace stp stop kernel hello and hold timers")
Reported-by: Haidong Li <haili@redhat.com>
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Reviewed-by: Ivan Vecera <cera@cera.cz>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
net/bridge/br_stp_if.c
net/bridge/br_stp_timer.c