netdev at kapio-technology.com
2022-Sep-28 07:47 UTC
[Bridge] [PATCH v5 net-next 6/6] selftests: forwarding: add test of MAC-Auth Bypass to locked port tests
On 2022-09-28 08:59, Ido Schimmel wrote:> Why not found? This works: > > # bridge fdb add 00:11:22:33:44:55 dev br0 self local > $ bridge fdb get 00:11:22:33:44:55 br br0With: # bridge fdb replace 00.11.22.33.44.55 dev $swpX static fdb_find_rcu() will not find the entry added with 'dev br0' above, and will thus add a new entry afaik.
Ido Schimmel
2022-Sep-28 08:46 UTC
[Bridge] [PATCH v5 net-next 6/6] selftests: forwarding: add test of MAC-Auth Bypass to locked port tests
On Wed, Sep 28, 2022 at 09:47:42AM +0200, netdev at kapio-technology.com wrote:> On 2022-09-28 08:59, Ido Schimmel wrote: > > > Why not found? This works: > > > > # bridge fdb add 00:11:22:33:44:55 dev br0 self local > > $ bridge fdb get 00:11:22:33:44:55 br br0 > > With: > # bridge fdb replace 00.11.22.33.44.55 dev $swpX static > > fdb_find_rcu() will not find the entry added with 'dev br0' above, and will > thus add a new entry afaik.It needs "master" keyword: $ bridge fdb get 00:11:22:33:44:55 br br0 Error: Fdb entry not found. # bridge fdb add 00:11:22:33:44:55 dev br0 self local $ bridge fdb get 00:11:22:33:44:55 br br0 00:11:22:33:44:55 dev br0 master br0 permanent # bridge fdb replace 00:11:22:33:44:55 dev dummy10 master static $ bridge fdb get 00:11:22:33:44:55 br br0 00:11:22:33:44:55 dev dummy10 master br0 static "master" means manipulate the FDB of the master device. Therefore, the replace command manipulates the FDB of br0. "self" (which is the default [1]) means manipulate the FDB of the device itself. In case of br0 it means manipulate the FDB of the bridge device. For physical devices it usually translates to manipulating the unicast address filter list. [1] https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/tree/bridge/fdb.c#n511