Skip to content

Commit d8e81f1

Browse files
idoschdavem330
authored andcommitted
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>
1 parent 1a36e0f commit d8e81f1

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

net/core/rtnetlink.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6488,6 +6488,14 @@ static int rtnl_mdb_del(struct sk_buff *skb, struct nlmsghdr *nlh,
64886488
return -EINVAL;
64896489
}
64906490

6491+
if (del_bulk) {
6492+
if (!dev->netdev_ops->ndo_mdb_del_bulk) {
6493+
NL_SET_ERR_MSG(extack, "Device does not support MDB bulk deletion");
6494+
return -EOPNOTSUPP;
6495+
}
6496+
return dev->netdev_ops->ndo_mdb_del_bulk(dev, tb, extack);
6497+
}
6498+
64916499
if (!dev->netdev_ops->ndo_mdb_del) {
64926500
NL_SET_ERR_MSG(extack, "Device does not support MDB operations");
64936501
return -EOPNOTSUPP;

0 commit comments

Comments
 (0)