bridge: dump vlan table information for link

Kernel also reports vlans a port is member of, so print it. Since vlan
table can be quite large, dump it only when detailed information is
requested.

Signed-off-by: Roman Mashak <mrv@mojatatu.com>
This commit is contained in:
Roman Mashak 2017-09-08 17:52:22 -04:00 committed by Stephen Hemminger
parent b97c679c9f
commit 52fd1fe36c
1 changed files with 7 additions and 0 deletions

View File

@ -213,6 +213,13 @@ int print_linkinfo(const struct sockaddr_nl *who,
if (aftb[IFLA_BRIDGE_MODE])
print_hwmode(fp, rta_getattr_u16(aftb[IFLA_BRIDGE_MODE]));
if (show_details) {
if (aftb[IFLA_BRIDGE_VLAN_INFO]) {
fprintf(fp, "\n");
print_vlan_info(fp, tb[IFLA_AF_SPEC],
ifi->ifi_index);
}
}
}
fprintf(fp, "\n");