From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roopa Prabhu Subject: [PATCH iproute2] bridge: fdb: remove redundant dev string in show output Date: Wed, 7 Nov 2018 15:14:09 -0800 Message-ID: <1541632449-9993-1-git-send-email-roopa@cumulusnetworks.com> Cc: netdev@vger.kernel.org, phil@nwl.cc, nikolay@cumulusnetworks.com, dsahern@gmail.com To: stephen@networkplumber.org Return-path: Received: from mail-pf1-f193.google.com ([209.85.210.193]:43570 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727951AbeKHIqv (ORCPT ); Thu, 8 Nov 2018 03:46:51 -0500 Received: by mail-pf1-f193.google.com with SMTP id g7-v6so6106668pfo.10 for ; Wed, 07 Nov 2018 15:14:14 -0800 (PST) Sender: netdev-owner@vger.kernel.org List-ID: From: Roopa Prabhu 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 Signed-off-by: Roopa Prabhu --- bridge/fdb.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/bridge/fdb.c b/bridge/fdb.c index f82938f..a5abc1b 100644 --- a/bridge/fdb.c +++ b/bridge/fdb.c @@ -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; -- 2.1.4