From: Roman Mashak Date: Fri, 8 Sep 2017 21:52:22 +0000 (-0400) Subject: bridge: dump vlan table information for link X-Git-Tag: v4.14.0~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=52fd1fe36c25175f79fc550e666eb0b194c7c1b4;p=thirdparty%2Fiproute2.git 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 --- diff --git a/bridge/link.c b/bridge/link.c index 93472ad36..60200f160 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");