bridge: mcast: Implement MDB net device operations
authorIdo Schimmel <idosch@nvidia.com>
Wed, 15 Mar 2023 13:11:46 +0000 (15:11 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 17 Mar 2023 08:05:48 +0000 (08:05 +0000)
commitc009de1061b57162fed206998dcdf8001416a481
tree0f9f1b123fc5a1fb86791529465b1fdb2d35bbf8
parent8c44fa12c8fa09c6c12f0dc25129a6d13ee0a1ea
bridge: mcast: Implement MDB net device operations

Implement the previously added MDB net device operations in the bridge
driver so that they could be invoked by core rtnetlink code in the next
patch.

The operations are identical to the existing br_mdb_{dump,add,del}
functions. The '_new' suffix will be removed in the next patch. The
functions are re-implemented in this patch to make the conversion in the
next patch easier to review.

Add dummy implementations when 'CONFIG_BRIDGE_IGMP_SNOOPING' is
disabled, so that an error will be returned to user space when it is
trying to add or delete an MDB entry. This is consistent with existing
behavior where the bridge driver does not even register rtnetlink
handlers for RTM_{NEW,DEL,GET}MDB messages when this Kconfig option is
disabled.

Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Nikolay Aleksandrov <razor@blackwall.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/br_device.c
net/bridge/br_mdb.c
net/bridge/br_private.h