diff options
author | Roman Mashak <mrv@mojatatu.com> | 2017-09-08 17:52:22 -0400 |
---|---|---|
committer | Stephen Hemminger <sthemmin@microsoft.com> | 2017-10-26 12:35:04 +0200 |
commit | 52fd1fe36c25175f79fc550e666eb0b194c7c1b4 (patch) | |
tree | d182dcbb00d13ec532181df034fc3a7ca2d81270 | |
parent | b97c679c9f1b36109fa439b93e6dbbeb98a9fb75 (diff) | |
download | platform_external_iproute2-52fd1fe36c25175f79fc550e666eb0b194c7c1b4.tar.gz platform_external_iproute2-52fd1fe36c25175f79fc550e666eb0b194c7c1b4.tar.bz2 platform_external_iproute2-52fd1fe36c25175f79fc550e666eb0b194c7c1b4.zip |
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>
-rw-r--r-- | bridge/link.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/bridge/link.c b/bridge/link.c index 93472ad3..60200f16 100644 --- a/bridge/link.c +++ b/bridge/link.c @@ -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"); |