[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <09b37bb3d091567c1f8958994e69e1221a61c0dc.camel@gmail.com>
Date: Sat, 20 Oct 2018 15:42:33 +0200
From: Tobias Jungel <tobias.jungel@...il.com>
To: Stephen Hemminger <stephen@...workplumber.org>
Cc: netdev@...r.kernel.org
Subject: [iproute2 PATCH] bridge: fix vlan show stats formatting
The output of -statistics vlan show was broken previous change for json
output. This aligns the format to vlan show.
Signed-off-by: Tobias Jungel <tobias.jungel@...il.com>
---
bridge/vlan.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/bridge/vlan.c b/bridge/vlan.c
index bdce55ae..85f4a539 100644
--- a/bridge/vlan.c
+++ b/bridge/vlan.c
@@ -487,8 +487,7 @@ static void print_vlan_stats_attr(struct rtattr *attr, int ifindex)
list = brtb[LINK_XSTATS_TYPE_BRIDGE];
rem = RTA_PAYLOAD(list);
- ifname = ll_index_to_name(ifindex);
- open_json_object(ifname);
+ open_vlan_port(ifindex);
print_color_string(PRINT_FP, COLOR_IFNAME,
NULL, "%-16s", ifname);
@@ -509,8 +508,7 @@ static void print_vlan_stats_attr(struct rtattr *attr, int ifindex)
print_one_vlan_stats(vstats);
}
- close_json_object();
-
+ close_vlan_port();
}
static int print_vlan_stats(const struct sockaddr_nl *who,
--
2.17.2
Powered by blists - more mailing lists