Skip to content

Commit 7e26bf4

Browse files
Nikolay Aleksandrovdavem330
authored andcommitted
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]>
1 parent 9a32562 commit 7e26bf4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

net/bridge/br_fdb.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -594,6 +594,9 @@ void br_fdb_update(struct net_bridge *br, struct net_bridge_port *source,
594594
fdb->updated = now;
595595
if (unlikely(added_by_user))
596596
fdb->added_by_user = 1;
597+
/* Take over HW learned entry */
598+
if (unlikely(fdb->added_by_external_learn))
599+
fdb->added_by_external_learn = 0;
597600
if (unlikely(fdb_modified))
598601
fdb_notify(br, fdb, RTM_NEWNEIGH);
599602
}

0 commit comments

Comments
 (0)