]> git.baikalelectronics.ru Git - kernel.git/commit
net: bridge: fdb: don't flush ext_learn entries
authorNikolay Aleksandrov <nikolay@nvidia.com>
Mon, 28 Sep 2020 15:30:02 +0000 (18:30 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Sep 2020 19:47:43 +0000 (12:47 -0700)
commitb458915089585b43b1e319a8e4efcf06b671597e
tree6793eddf9b64cdd62988fddd1a7a3852d8b4c6bc
parent6e9e9f0127037486447f606db948be8bccdabc07
net: bridge: fdb: don't flush ext_learn entries

When a user-space software manages fdb entries externally it should
set the ext_learn flag which marks the fdb entry as externally managed
and avoids expiring it (they're treated as static fdbs). Unfortunately
on events where fdb entries are flushed (STP down, netlink fdb flush
etc) these fdbs are also deleted automatically by the bridge. That in turn
causes trouble for the managing user-space software (e.g. in MLAG setups
we lose remote fdb entries on port flaps).
These entries are completely externally managed so we should avoid
automatically deleting them, the only exception are offloaded entries
(i.e. BR_FDB_ADDED_BY_EXT_LEARN + BR_FDB_OFFLOADED). They are flushed as
before.

Fixes: 576eeb71159b ("net: bridge: allow to add externally learned entries from user-space")
Signed-off-by: Nikolay Aleksandrov <nikolay@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/br_fdb.c