Commit f851a721 authored by Vladimir Oltean's avatar Vladimir Oltean Committed by David S. Miller

net: bridge: allow br_fdb_replay to be called for the bridge device

When a port joins a bridge which already has local FDB entries pointing
to the bridge device itself, we would like to offload those, so allow
the "dev" argument to be equal to the bridge too. The code already does
what we need in that case.
Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6eb38bf8
...@@ -760,7 +760,10 @@ int br_fdb_replay(const struct net_device *br_dev, const struct net_device *dev, ...@@ -760,7 +760,10 @@ int br_fdb_replay(const struct net_device *br_dev, const struct net_device *dev,
unsigned long action; unsigned long action;
int err = 0; int err = 0;
if (!netif_is_bridge_master(br_dev) || !netif_is_bridge_port(dev)) if (!netif_is_bridge_master(br_dev))
return -EINVAL;
if (!netif_is_bridge_port(dev) && !netif_is_bridge_master(dev))
return -EINVAL; return -EINVAL;
br = netdev_priv(br_dev); br = netdev_priv(br_dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment