]> git.baikalelectronics.ru Git - kernel.git/commit
net: bridge: vlan: use br_rports_fill_info() to export mcast router ports
authorNikolay Aleksandrov <nikolay@nvidia.com>
Tue, 10 Aug 2021 15:29:33 +0000 (18:29 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 11 Aug 2021 12:34:41 +0000 (13:34 +0100)
commite2eba5c321fffe1dfef31b27d8484a10cee7a0ec
tree2f8754b7c61df9fa30f6ce04b33b1d8f1691818a
parent76a1c7be7cb5f2810f46fbefb8df7d47175ff422
net: bridge: vlan: use br_rports_fill_info() to export mcast router ports

Embed the standard multicast router port export by br_rports_fill_info()
into a new global vlan attribute BRIDGE_VLANDB_GOPTS_MCAST_ROUTER_PORTS.
In order to have the same format for the global bridge mcast context and
the per-vlan mcast context we need a double-nesting:
 - BRIDGE_VLANDB_GOPTS_MCAST_ROUTER_PORTS
   - MDBA_ROUTER

Currently we don't compare router lists, if any router port exists in
the bridge mcast contexts we consider their option sets as different and
export them separately.

In addition we export the router port vlan id when dumping similar to
the router port notification format.

Signed-off-by: Nikolay Aleksandrov <nikolay@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/uapi/linux/if_bridge.h
net/bridge/br_mdb.c
net/bridge/br_private.h
net/bridge/br_vlan_options.c