[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YzQJ5MRSL/ShRSgP@shredder>
Date: Wed, 28 Sep 2022 11:46:28 +0300
From: Ido Schimmel <idosch@...dia.com>
To: netdev@...io-technology.com
Cc: Vladimir Oltean <olteanv@...il.com>, davem@...emloft.net,
kuba@...nel.org, netdev@...r.kernel.org,
Florian Fainelli <f.fainelli@...il.com>,
Andrew Lunn <andrew@...n.ch>,
Vivien Didelot <vivien.didelot@...il.com>,
Eric Dumazet <edumazet@...gle.com>,
Paolo Abeni <pabeni@...hat.com>,
Kurt Kanzenbach <kurt@...utronix.de>,
Hauke Mehrtens <hauke@...ke-m.de>,
Woojung Huh <woojung.huh@...rochip.com>,
UNGLinuxDriver@...rochip.com, Sean Wang <sean.wang@...iatek.com>,
Landen Chao <Landen.Chao@...iatek.com>,
DENG Qingfang <dqfext@...il.com>,
Matthias Brugger <matthias.bgg@...il.com>,
Claudiu Manoil <claudiu.manoil@....com>,
Alexandre Belloni <alexandre.belloni@...tlin.com>,
Jiri Pirko <jiri@...nulli.us>,
Ivan Vecera <ivecera@...hat.com>,
Roopa Prabhu <roopa@...dia.com>,
Nikolay Aleksandrov <razor@...ckwall.org>,
Shuah Khan <shuah@...nel.org>,
Christian Marangi <ansuelsmth@...il.com>,
Daniel Borkmann <daniel@...earbox.net>,
Yuwei Wang <wangyuweihx@...il.com>,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org,
bridge@...ts.linux-foundation.org, linux-kselftest@...r.kernel.org
Subject: Re: [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@...io-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
Powered by blists - more mailing lists