diff options
author | Nikolay Aleksandrov <nikolay@cumulusnetworks.com> | 2017-03-23 12:27:12 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-03-24 12:30:21 -0700 |
commit | 7e26bf45e4cb4ffaa113dc4a95a3d78bcc51e4cb (patch) | |
tree | 41975fa9ec23f322a3c2718e5d9a8d0b68c400b3 /net/bridge | |
parent | 9a32562becd95296a9403175d4992ee3b730e72a (diff) | |
download | linux-7e26bf45e4cb4ffaa113dc4a95a3d78bcc51e4cb.tar.bz2 |
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 <roopa@cumulusnetworks.com>
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')
-rw-r--r-- | net/bridge/br_fdb.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/bridge/br_fdb.c b/net/bridge/br_fdb.c index 6e08b7199dd7..daebce89dba8 100644 --- a/net/bridge/br_fdb.c +++ b/net/bridge/br_fdb.c @@ -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); } |