diff options
author | Nikolay Aleksandrov <nikolay@cumulusnetworks.com> | 2017-03-23 12:27:13 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-03-24 12:30:21 -0700 |
commit | eb100e0e24a23f309d0765061ea4dfd8ca9d400d (patch) | |
tree | dbb754ed82d3266d438fba54a6dfc4273c385c85 /net/bridge/br_fdb.c | |
parent | 7e26bf45e4cb4ffaa113dc4a95a3d78bcc51e4cb (diff) | |
download | linux-eb100e0e24a23f309d0765061ea4dfd8ca9d400d.tar.bz2 |
net: bridge: allow to add externally learned entries from user-space
The NTF_EXT_LEARNED flag was added for switchdev and externally learned
entries, but it can also be used for entries learned via a software
in user-space which requires dynamic entries that do not expire.
One such case that we have is with quagga and evpn which need dynamic
entries but also require to age them themselves.
Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Reviewed-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge/br_fdb.c')
-rw-r--r-- | net/bridge/br_fdb.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/bridge/br_fdb.c b/net/bridge/br_fdb.c index daebce89dba8..5a40a87c4f4f 100644 --- a/net/bridge/br_fdb.c +++ b/net/bridge/br_fdb.c @@ -857,6 +857,8 @@ static int __br_fdb_add(struct ndmsg *ndm, struct net_bridge *br, br_fdb_update(br, p, addr, vid, true); rcu_read_unlock(); local_bh_enable(); + } else if (ndm->ndm_flags & NTF_EXT_LEARNED) { + err = br_fdb_external_learn_add(br, p, addr, vid); } else { spin_lock_bh(&br->hash_lock); err = fdb_add_entry(br, p, addr, ndm->ndm_state, |