diff options
author | Roman Mashak <mrv@mojatatu.com> | 2017-09-08 17:52:23 -0400 |
---|---|---|
committer | Stephen Hemminger <sthemmin@microsoft.com> | 2017-10-26 12:35:04 +0200 |
commit | fab9a18a2e527c3d35c95abd7e09f6d4bd06754c (patch) | |
tree | c8f8646dbecf7feacc47f58133cb4c3ec483cfc8 | |
parent | 52fd1fe36c25175f79fc550e666eb0b194c7c1b4 (diff) | |
download | platform_external_iproute2-fab9a18a2e527c3d35c95abd7e09f6d4bd06754c.tar.gz platform_external_iproute2-fab9a18a2e527c3d35c95abd7e09f6d4bd06754c.tar.bz2 platform_external_iproute2-fab9a18a2e527c3d35c95abd7e09f6d4bd06754c.zip |
bridge: request vlans along with link information
Signed-off-by: Roman Mashak <mrv@mojatatu.com>
-rw-r--r-- | bridge/link.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/bridge/link.c b/bridge/link.c index 60200f16..9e4206f5 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) { |