]> git.baikalelectronics.ru Git - kernel.git/commit
net: bridge: avoid duplicate notification on up/down/change netdev events
authorNikolay Aleksandrov <nikolay@cumulusnetworks.com>
Thu, 3 May 2018 10:47:24 +0000 (13:47 +0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 3 May 2018 17:40:54 +0000 (13:40 -0400)
commit60b4972ff5bba5f1f3f52057aac570a3a9112e67
tree651cbd227fc7cb4252c03f66a07f608a9a31378a
parentf2ed22729fb50d70d1f5e390d3ce9b3e7210a4b4
net: bridge: avoid duplicate notification on up/down/change netdev events

While handling netdevice events, br_device_event() sometimes uses
br_stp_(disable|enable)_port which unconditionally send a notification,
but then a second notification for the same event is sent at the end of
the br_device_event() function. To avoid sending duplicate notifications
in such cases, check if one has already been sent (i.e.
br_stp_enable/disable_port have been called).
The patch is based on a change by Satish Ashok.

Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/br.c
net/bridge/br_if.c
net/bridge/br_private.h