]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
bridge: request vlans along with link information
authorRoman Mashak <mrv@mojatatu.com>
Fri, 8 Sep 2017 21:52:23 +0000 (17:52 -0400)
committerStephen Hemminger <sthemmin@microsoft.com>
Thu, 26 Oct 2017 10:35:04 +0000 (12:35 +0200)
Signed-off-by: Roman Mashak <mrv@mojatatu.com>
bridge/link.c

index 60200f160622a7e3a3c0e17f9426b4be96e1fd60..9e4206f5dba1e803949f8b47ca1d5f67708270e4 100644 (file)
@@ -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) {