diff options
author | Ido Schimmel <idosch@nvidia.com> | 2023-12-17 10:32:39 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-12-20 11:27:20 +0000 |
commit | d8e81f131178dad603c6817421056030ed2f4ac2 (patch) | |
tree | ff7a3cee120ec36da8daf71d371086a5a4609afa /net/core | |
parent | 1a36e0f50f963465e9b2b980d250ab38b8fcd7a3 (diff) |
rtnetlink: bridge: Invoke MDB bulk deletion when needed
Invoke the new MDB bulk deletion device operation when the 'NLM_F_BULK'
flag is set in the netlink message header.
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Petr Machata <petrm@nvidia.com>
Acked-by: Nikolay Aleksandrov <razor@blackwall.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/rtnetlink.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index a0fad4d8856c..ec185e131766 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c @@ -6488,6 +6488,14 @@ static int rtnl_mdb_del(struct sk_buff *skb, struct nlmsghdr *nlh, return -EINVAL; } + if (del_bulk) { + if (!dev->netdev_ops->ndo_mdb_del_bulk) { + NL_SET_ERR_MSG(extack, "Device does not support MDB bulk deletion"); + return -EOPNOTSUPP; + } + return dev->netdev_ops->ndo_mdb_del_bulk(dev, tb, extack); + } + if (!dev->netdev_ops->ndo_mdb_del) { NL_SET_ERR_MSG(extack, "Device does not support MDB operations"); return -EOPNOTSUPP; |