mirror of
https://github.com/torvalds/linux.git
synced 2026-11-26 16:33:17 +00:00
net: bridge: allow SW learn to take over HW fdb entries
Allow to take over an entry which was previously learned via HW when it shows up from a SW port. This is analogous to how HW takes over SW learned entries already. Suggested-by: Roopa Prabhu <[email protected]> Signed-off-by: Nikolay Aleksandrov <[email protected]> Reviewed-by: Ido Schimmel <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
committed by
David S. Miller
parent
9a32562bec
commit
7e26bf45e4
@@ -594,6 +594,9 @@ void br_fdb_update(struct net_bridge *br, struct net_bridge_port *source,
|
||||
fdb->updated = now;
|
||||
if (unlikely(added_by_user))
|
||||
fdb->added_by_user = 1;
|
||||
/* Take over HW learned entry */
|
||||
if (unlikely(fdb->added_by_external_learn))
|
||||
fdb->added_by_external_learn = 0;
|
||||
if (unlikely(fdb_modified))
|
||||
fdb_notify(br, fdb, RTM_NEWNEIGH);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user