]> git.ipfire.org Git - thirdparty/iproute2.git/commit
bridge: mdb: add support for source address
authorNikolay Aleksandrov <nikolay@nvidia.com>
Thu, 8 Oct 2020 13:50:19 +0000 (16:50 +0300)
committerDavid Ahern <dsahern@gmail.com>
Mon, 12 Oct 2020 02:07:25 +0000 (20:07 -0600)
commit547b31976215e596a3661f3a1b86cd109afd6f0e
tree49231a540953151e29760e9675436a9fb70a5019
parentf905191a486e8f83e4072493514e756a75cd2693
bridge: mdb: add support for source address

This patch adds the user-space control and dump of mdb entry source
address. When setting the new MDBA_SET_ENTRY_ATTRS nested attribute is
used and inside is added MDBE_ATTR_SOURCE based on the address family.
When dumping we look for MDBA_MDB_EATTR_SOURCE and if present we add the
"src x.x.x.x" output. The source address will be always shown as it's
needed to match the entry to modify it from user-space.

Example:
 $ bridge mdb add dev bridge port ens13 grp 239.0.0.1 src 1.2.3.4 permanent vid 100
 $ bridge mdb show
 dev bridge port ens13 grp 239.0.0.1 src 1.2.3.4 permanent vid 100

Signed-off-by: Nikolay Aleksandrov <nikolay@nvidia.com>
Signed-off-by: David Ahern <dsahern@gmail.com>
bridge/mdb.c
man/man8/bridge.8