]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
bridge: fdb: remove redundant dev string in show output
authorRoopa Prabhu <roopa@cumulusnetworks.com>
Wed, 7 Nov 2018 23:14:09 +0000 (15:14 -0800)
committerStephen Hemminger <stephen@networkplumber.org>
Fri, 9 Nov 2018 15:50:01 +0000 (07:50 -0800)
After commit 4abb8c723a64 ("bridge: fdb: Fix for missing
keywords in non-JSON output"), I am seeing a double print for dev
in bridge fdb show. eg:
"44:38:39:00:6a:82 dev dev bridge vlan 1 master bridge permanent"

this patch removes the redundant print.

Fixes: 4abb8c723a64 ("bridge: fdb: Fix for missing keywords in non-JSON output")
CC: Phil Sutter <phil@nwl.cc>
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Acked-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
bridge/fdb.c

index f82938f838ae2173524553e17312d5fae3f0b08d..a5abc1b6c78d81b215b6b6bbe78d9d90d7973ec8 100644 (file)
@@ -181,13 +181,10 @@ int print_fdb(struct nlmsghdr *n, void *arg)
                                   "mac", "%s ", lladdr);
        }
 
-       if (!filter_index && r->ndm_ifindex) {
-               if (!is_json_context())
-                       fprintf(fp, "dev ");
+       if (!filter_index && r->ndm_ifindex)
                print_color_string(PRINT_ANY, COLOR_IFNAME,
                                   "ifname", "dev %s ",
                                   ll_index_to_name(r->ndm_ifindex));
-       }
 
        if (tb[NDA_DST]) {
                int family = AF_INET;