iproute2/bridge
Roopa Prabhu cc273a51d0 bridge: Add master device name to bridge fdb show
This patch adds master dev name from NDA_MASTER netlink attribute
 to bridge fdb show output

current iproute2 tries to print 'master' in the output if NTF_MASTER
is present. But, kernel today does not set NTF_MASTER during dump
requests. Which means I have not seen iproute2 bridge cmd print 'master' atall.
This patch overrides the NTF_MASTER flag if NDA_MASTER attribute is present.

Example output:

before this patch:
# bridge fdb show
44:38:39:00:27:ba dev bond2.2003 permanent
44:38:39:00:27:bb dev bond4.2003 permanent
44:38:39:00:27:bc dev bond2.2004 permanent

After this patch:
# bridge fdb show
44:38:39:00:27:ba dev bond2.2003 master br-2003 permanent
44:38:39:00:27:bb dev bond4.2003 master br-2003 permanent
44:38:39:00:27:bc dev bond2.2004 master br-2004 permanent

For comparision with the above, below is the output for NTF_SELF today,
# bridge fdb show
33:33:00:00:00:01 dev eth0 self permanent
01:00:5e:00:00:01 dev eth0 self permanent
33:33:ff:00:01:cc dev eth0 self permanent

If change in output is a concern, 'master' can be put at the end of the fdb
output line or made optional with -d[etails] option.

change from v1 to v2:
    use 'bridge' instead of 'master' in fdb show output

change from v2 to v3:
    use 'master' instead of 'bridge' in fdb show output
    (master could also be a vxlan device)

Signed-off-by: Wilson Kok <wkok@cumulusnetworks.com>
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2014-06-09 12:56:23 -07:00
..
.gitignore Add bridge command 2012-08-01 15:23:49 -07:00
Makefile bridge: Add vlan configuration support 2013-03-06 11:03:08 -08:00
br_common.h bridge: Add support for setting bridge port attributes 2013-03-16 10:01:53 -07:00
bridge.c bridge: add oneline option 2013-03-16 10:18:50 -07:00
fdb.c bridge: Add master device name to bridge fdb show 2014-06-09 12:56:23 -07:00
link.c bridge: Make filter_index match in signedness 2014-06-09 12:40:45 -07:00
mdb.c bridge: Make filter_index match in signedness 2014-06-09 12:40:45 -07:00
monitor.c iproute2: bridge: Close file with bridge monitor file 2013-09-30 21:00:06 -07:00
vlan.c bridge: Make filter_index match in signedness 2014-06-09 12:40:45 -07:00