Skip to contentSkip to conversation

bridge: fdb: remove redundant dev string in show output

PATCH Applied Roopa Prabhu 3 participants 4 messages Nov 8, 2018 – Nov 10, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bridge: fdb: remove redundant dev string in show output

From: Roopa Prabhu <[email protected]>

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 <[email protected]>
---
 bridge/fdb.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
bridge/fdb.c +1 -4
index f82938f..a5abc1b 100644
@@ -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;
Signature · 1 line
2.1.4
Acked-by on v1 1/1
#1 lore raw

Hi Roopa,

Quoted 10 lines · Roopa Prabhu

From: Roopa Prabhu <[email protected]>

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")

Oh, stupid mistake. :(

Thanks for the fix!

Quoted 2 lines
#2 lore raw
Quoted 13 lines · On Thu, 8 Nov 2018 10:35:05 +0100 Phil Sutter <[email protected]> wrote:

Hi Roopa,

Quoted 10 lines · Roopa Prabhu

From: Roopa Prabhu <[email protected]>

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")

Applied.

#3 lore raw
In reply to Roopa Prabhu
Quoted 7 lines · On Wed, 7 Nov 2018 15:14:09 -0800 Roopa Prabhu <[email protected]>…

From: Roopa Prabhu <[email protected]>

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"

Quoted 5 lines

this patch removes the redundant print.

Fixes 4abb8c723a64 ("bridge: fdb: Fix for missing keywords in non-JSON output")
CC Phil Sutter <[email protected]>

Applied, thanks.