From: Roman Mashak Date: Fri, 8 Sep 2017 21:52:23 +0000 (-0400) Subject: bridge: request vlans along with link information X-Git-Tag: v4.14.0~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fab9a18a2e527c3d35c95abd7e09f6d4bd06754c;p=thirdparty%2Fiproute2.git bridge: request vlans along with link information Signed-off-by: Roman Mashak --- diff --git a/bridge/link.c b/bridge/link.c index 60200f160..9e4206f5d 100644 --- a/bridge/link.c +++ b/bridge/link.c @@ -461,9 +461,19 @@ static int brlink_show(int argc, char **argv) } } - if (rtnl_wilddump_request(&rth, PF_BRIDGE, RTM_GETLINK) < 0) { - perror("Cannon send dump request"); - exit(1); + if (show_details) { + if (rtnl_wilddump_req_filter(&rth, PF_BRIDGE, RTM_GETLINK, + (compress_vlans ? + RTEXT_FILTER_BRVLAN_COMPRESSED : + RTEXT_FILTER_BRVLAN)) < 0) { + perror("Cannon send dump request"); + exit(1); + } + } else { + if (rtnl_wilddump_request(&rth, PF_BRIDGE, RTM_GETLINK) < 0) { + perror("Cannon send dump request"); + exit(1); + } } if (rtnl_dump_filter(&rth, print_linkinfo, stdout) < 0) {