Skip to content

Commit eb100e0

Browse files
Nikolay Aleksandrovdavem330
authored andcommitted
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 <[email protected]> Reviewed-by: Ido Schimmel <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 7e26bf4 commit eb100e0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

net/bridge/br_fdb.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -857,6 +857,8 @@ static int __br_fdb_add(struct ndmsg *ndm, struct net_bridge *br,
857857
br_fdb_update(br, p, addr, vid, true);
858858
rcu_read_unlock();
859859
local_bh_enable();
860+
} else if (ndm->ndm_flags & NTF_EXT_LEARNED) {
861+
err = br_fdb_external_learn_add(br, p, addr, vid);
860862
} else {
861863
spin_lock_bh(&br->hash_lock);
862864
err = fdb_add_entry(br, p, addr, ndm->ndm_state,

0 commit comments

Comments
 (0)