On Sat, Jan 30, 2021 at 09:47:02PM +0100, Tobias Waldekranz wrote: > root@envoy:~# bridge fdb add 02:00:de:ad:00:01 dev eth1 static vlan 1 > Why does the second add operation succeed? Am I missing some magic flag?
Yes, 'master'. We talked about this before. 'bridge fdb add' is implicitly 'self' which bypasses the bridge code and shoots straight for the .ndo_fdb_add that DSA implements. Maybe we should just kill that to avoid further confusion. $ bridge link 6: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 master br0 state disabled priority 32 cost 100 7: eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 master br0 state disabled priority 32 cost 100 10: swp5@eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 master br0 state forwarding priority 32 cost 4 11: swp2@eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 master br0 state forwarding priority 32 cost 4 12: swp3@eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 master br0 state forwarding priority 32 cost 4 13: swp4@eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 master br0 state forwarding priority 32 cost 4 $ bridge fdb add 00:01:02:03:04:05 dev eth0 master static $ bridge fdb add 00:01:02:03:04:05 dev eth1 master static RTNETLINK answers: File exists