diff options
author | Nikolay Aleksandrov <nikolay@cumulusnetworks.com> | 2017-11-01 12:18:13 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-11-02 15:53:40 +0900 |
commit | 928990631327cf00a9195e30fa22f7ae5f8d7e67 (patch) | |
tree | 75964113b15c223e5ff57e2921e48070f87f47be /net/bridge/br_stp_if.c | |
parent | ad88d35a6216c54a005480d2693ed0a888ac1b7c (diff) | |
download | talos-obmc-linux-928990631327cf00a9195e30fa22f7ae5f8d7e67.tar.gz talos-obmc-linux-928990631327cf00a9195e30fa22f7ae5f8d7e67.zip |
net: bridge: add notifications for the bridge dev on vlan change
Currently the bridge device doesn't generate any notifications upon vlan
modifications on itself because it doesn't use the generic bridge
notifications.
With the recent changes we know if anything was modified in the vlan config
thus we can generate a notification when necessary for the bridge device
so add support to br_ifinfo_notify() similar to how other combined
functions are done - if port is present it takes precedence, otherwise
notify about the bridge. I've explicitly marked the locations where the
notification should be always for the port by setting bridge to NULL.
I've also taken the liberty to rearrange each modified function's local
variables in reverse xmas tree as well.
Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge/br_stp_if.c')
-rw-r--r-- | net/bridge/br_stp_if.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/bridge/br_stp_if.c b/net/bridge/br_stp_if.c index 89110319ef0f..808e2b914015 100644 --- a/net/bridge/br_stp_if.c +++ b/net/bridge/br_stp_if.c @@ -96,7 +96,7 @@ void br_stp_enable_port(struct net_bridge_port *p) { br_init_port(p); br_port_state_selection(p->br); - br_ifinfo_notify(RTM_NEWLINK, p); + br_ifinfo_notify(RTM_NEWLINK, NULL, p); } /* called under bridge lock */ @@ -111,7 +111,7 @@ void br_stp_disable_port(struct net_bridge_port *p) p->topology_change_ack = 0; p->config_pending = 0; - br_ifinfo_notify(RTM_NEWLINK, p); + br_ifinfo_notify(RTM_NEWLINK, NULL, p); del_timer(&p->message_age_timer); del_timer(&p->forward_delay_timer); |