]> git.ipfire.org Git - thirdparty/iproute2.git/commit
bridge: fdb: add flush port matching
authorNikolay Aleksandrov <razor@blackwall.org>
Wed, 8 Jun 2022 12:29:14 +0000 (15:29 +0300)
committerDavid Ahern <dsahern@kernel.org>
Fri, 10 Jun 2022 15:01:29 +0000 (09:01 -0600)
commitbb9e453c14068c308f000cdcff98a4dd468358d5
tree6e8a73eb73f774f75b1b5bd0192df194ee65035b
parentd9c15896f1d3bbe768180f8b6abd0ec0ea89dcb1
bridge: fdb: add flush port matching

Usually we match on the device specified after "dev" but there are
special cases where we need an additional device attribute for matching
such as when matching entries specifically pointing to the bridge device
itself. We use NDA_IFINDEX for that purpose.

Example:
$ bridge fdb flush dev br0 brport br0
This will flush only entries pointing to the bridge itself.

$ bridge fdb flush dev swp1 brport swp2 master
Note this will flush entries pointing to swp2 only. The NDA_IFINDEX
attribute overrides the dev argument. This is documented in the man
page.

Signed-off-by: Nikolay Aleksandrov <razor@blackwall.org>
Signed-off-by: David Ahern <dsahern@kernel.org>
bridge/fdb.c
man/man8/bridge.8