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