]> git.baikalelectronics.ru Git - kernel.git/commit
net: bridge: notify on vlan tunnel changes done via the old api
authorNikolay Aleksandrov <nikolay@cumulusnetworks.com>
Sat, 11 Jul 2020 15:05:04 +0000 (18:05 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sun, 12 Jul 2020 22:18:24 +0000 (15:18 -0700)
commitf15e8e5f7e96061ec571f05ced1621f2b3036b37
tree4716911375d38fc0536f5ccebbb8083680f854f4
parent3e7032e415a274d0f55710acf39700d18b94606b
net: bridge: notify on vlan tunnel changes done via the old api

If someone uses the old vlan API to configure tunnel mappings we'll only
generate the old-style full port notification. That would be a problem
if we are monitoring the new vlan notifications for changes. The patch
resolves the issue by adding vlan notifications to the old tunnel netlink
code. As usual we try to compress the notifications for as many vlans
in a range as possible, thus a vlan tunnel change is considered able
to enter the "current" vlan notification range if:
 1. vlan exists
 2. it has actually changed (curr_change == true)
 3. it passes all standard vlan notification range checks done by
    br_vlan_can_enter_range() such as option equality, id continuity etc

Note that vlan tunnel changes (add/del) are considered a part of vlan
options so only RTM_NEWVLAN notification is generated with the relevant
information inside.

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