@@ -6188,6 +6188,9 @@ ice_fdb_del(struct ndmsg *ndm, __always_unused struct nlattr *tb[],
else
err = -EINVAL;
+ if (!err)
+ rtnl_fdb_notify(dev, addr, vid, RTM_DELNEIGH, ndm->ndm_state);
+
return err;
}
@@ -756,8 +756,14 @@ static int ocelot_port_fdb_del(struct ndmsg *ndm, struct nlattr *tb[],
struct ocelot_port *ocelot_port = &priv->port;
struct ocelot *ocelot = ocelot_port->ocelot;
int port = priv->port.index;
+ int err;
- return ocelot_fdb_del(ocelot, port, addr, vid, ocelot_port->bridge);
+ err = ocelot_fdb_del(ocelot, port, addr, vid, ocelot_port->bridge);
+
+ if (!err)
+ rtnl_fdb_notify(dev, addr, vid, RTM_DELNEIGH, ndm->ndm_state);
+
+ return err;
}
static int ocelot_port_fdb_do_dump(const unsigned char *addr, u16 vid,
@@ -388,6 +388,11 @@ static int qlcnic_fdb_del(struct ndmsg *ndm, struct nlattr *tb[],
err = -EINVAL;
}
}
+
+ if (!err)
+ rtnl_fdb_notify(netdev, addr, vid, RTM_DELNEIGH,
+ ndm->ndm_state);
+
return err;
}
@@ -1069,6 +1069,9 @@ static int macvlan_fdb_del(struct ndmsg *ndm, struct nlattr *tb[],
else if (is_multicast_ether_addr(addr))
err = dev_mc_del(dev, addr);
+ if (!err)
+ rtnl_fdb_notify(dev, addr, vid, RTM_DELNEIGH, ndm->ndm_state);
+
return err;
}
@@ -1254,6 +1254,8 @@ struct netdev_net_notifier {
* struct net_device *dev,
* const unsigned char *addr, u16 vid)
* Deletes the FDB entry from dev corresponding to addr.
+ * Callee is responsible for sending appropriate notification, as with
+ * ndo_fdb_add().
* int (*ndo_fdb_del_bulk)(struct nlmsghdr *nlh, struct net_device *dev,
* struct netlink_ext_ack *extack);
* int (*ndo_fdb_dump)(struct sk_buff *skb, struct netlink_callback *cb,
@@ -4506,6 +4506,9 @@ int ndo_dflt_fdb_del(struct ndmsg *ndm,
else if (is_multicast_ether_addr(addr))
err = dev_mc_del(dev, addr);
+ if (!err)
+ rtnl_fdb_notify(dev, addr, vid, RTM_DELNEIGH, ndm->ndm_state);
+
return err;
}
EXPORT_SYMBOL(ndo_dflt_fdb_del);
@@ -4604,12 +4607,8 @@ static int rtnl_fdb_del(struct sk_buff *skb, struct nlmsghdr *nlh,
err = ops->ndo_fdb_del_bulk(nlh, dev, extack);
}
- if (!err) {
- if (!del_bulk)
- rtnl_fdb_notify(dev, addr, vid, RTM_DELNEIGH,
- ndm->ndm_state);
+ if (!err)
ndm->ndm_flags &= ~NTF_SELF;
- }
}
out:
return err;