naccyde / rpms / iproute

Forked from rpms/iproute 5 months ago
Clone

Blame SOURCES/0018-bridge-fdb-Fix-for-missing-keywords-in-non-JSON-outp.patch

7e752c
From 32c326673c4c2a5513d52898ebab453ccbb178a2 Mon Sep 17 00:00:00 2001
7e752c
From: Phil Sutter <psutter@redhat.com>
7e752c
Date: Thu, 18 Oct 2018 10:52:09 +0200
7e752c
Subject: [PATCH] bridge: fdb: Fix for missing keywords in non-JSON output
7e752c
7e752c
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1636532
7e752c
Upstream Status: iproute2.git commit 4abb8c723a648
7e752c
7e752c
commit 4abb8c723a648ac9edc33741d2064e2507a6bae3
7e752c
Author: Phil Sutter <phil@nwl.cc>
7e752c
Date:   Tue Oct 9 14:44:08 2018 +0200
7e752c
7e752c
    bridge: fdb: Fix for missing keywords in non-JSON output
7e752c
7e752c
    While migrating to JSON print library, some keywords were dropped from
7e752c
    standard output by accident. Add them back to unbreak output parsers.
7e752c
7e752c
    Fixes: c7c1a1ef51aea ("bridge: colorize output and use JSON print library")
7e752c
    Signed-off-by: Phil Sutter <phil@nwl.cc>
7e752c
    Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
7e752c
---
7e752c
 bridge/fdb.c | 6 +++---
7e752c
 1 file changed, 3 insertions(+), 3 deletions(-)
7e752c
7e752c
diff --git a/bridge/fdb.c b/bridge/fdb.c
7e752c
index 4dbc894..6487fac 100644
7e752c
--- a/bridge/fdb.c
7e752c
+++ b/bridge/fdb.c
7e752c
@@ -182,7 +182,7 @@ int print_fdb(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
7e752c
 		if (!is_json_context())
7e752c
 			fprintf(fp, "dev ");
7e752c
 		print_color_string(PRINT_ANY, COLOR_IFNAME,
7e752c
-				   "ifname", "%s ",
7e752c
+				   "ifname", "dev %s ",
7e752c
 				   ll_index_to_name(r->ndm_ifindex));
7e752c
 	}
7e752c
 
7e752c
@@ -199,7 +199,7 @@ int print_fdb(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
7e752c
 
7e752c
 		print_color_string(PRINT_ANY,
7e752c
 				   ifa_family_color(family),
7e752c
-				    "dst", "%s ", dst);
7e752c
+				    "dst", "dst %s ", dst);
7e752c
 	}
7e752c
 
7e752c
 	if (vid)
7e752c
@@ -246,7 +246,7 @@ int print_fdb(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
7e752c
 
7e752c
 
7e752c
 	if (tb[NDA_MASTER])
7e752c
-		print_string(PRINT_ANY, "master", "%s ",
7e752c
+		print_string(PRINT_ANY, "master", "master %s ",
7e752c
 			     ll_index_to_name(rta_getattr_u32(tb[NDA_MASTER])));
7e752c
 
7e752c
 	print_string(PRINT_ANY, "state", "%s\n",
7e752c
-- 
7e752c
1.8.3.1
7e752c