diff options
author | Vladimir Oltean <vladimir.oltean@nxp.com> | 2021-06-29 16:06:46 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-06-29 19:46:23 +0200 |
commit | f851a721a638316a8257459db8359f2930d4b473 (patch) | |
tree | 2520a8a36fc4ac6beadc7d6dd3e78d0655a8d8bd /net/bridge | |
parent | net: bridge: switchdev: send FDB notifications for host addresses (diff) | |
download | linux-f851a721a638316a8257459db8359f2930d4b473.tar.xz linux-f851a721a638316a8257459db8359f2930d4b473.zip |
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: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge')
-rw-r--r-- | net/bridge/br_fdb.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/bridge/br_fdb.c b/net/bridge/br_fdb.c index bad7e84d76af..2b862cffc03a 100644 --- a/net/bridge/br_fdb.c +++ b/net/bridge/br_fdb.c @@ -760,7 +760,10 @@ int br_fdb_replay(const struct net_device *br_dev, const struct net_device *dev, unsigned long action; 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; br = netdev_priv(br_dev); |