* [PATCH iproute2] bridge: vlan json: skip ports with empty vlans
@ 2016-08-07 19:37 Roopa Prabhu
2016-08-08 15:43 ` Stephen Hemminger
0 siblings, 1 reply; 2+ messages in thread
From: Roopa Prabhu @ 2016-08-07 19:37 UTC (permalink / raw)
To: stephen; +Cc: netdev
From: Roopa Prabhu <roopa@cumulusnetworks.com>
The non-json output prints 'None' for such vlans.
And this can garble json output.
Fixes: d82a49ce85f0 ("bridge: add json support for bridge vlan show")
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
---
saw this when deploying a mix of vlan filtering and non-vlan
filtering bridges.
bridge/vlan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bridge/vlan.c b/bridge/vlan.c
index 22f32a5..d3505b5 100644
--- a/bridge/vlan.c
+++ b/bridge/vlan.c
@@ -212,7 +212,7 @@ static int print_vlan(const struct sockaddr_nl *who,
/* if AF_SPEC isn't there, vlan table is not preset for this port */
if (!tb[IFLA_AF_SPEC]) {
- if (!filter_vlan)
+ if (!filter_vlan && !jw_global)
fprintf(fp, "%s\tNone\n",
ll_index_to_name(ifm->ifi_index));
return 0;
--
2.1.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH iproute2] bridge: vlan json: skip ports with empty vlans
2016-08-07 19:37 [PATCH iproute2] bridge: vlan json: skip ports with empty vlans Roopa Prabhu
@ 2016-08-08 15:43 ` Stephen Hemminger
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Hemminger @ 2016-08-08 15:43 UTC (permalink / raw)
To: Roopa Prabhu; +Cc: netdev
On Sun, 7 Aug 2016 12:37:03 -0700
Roopa Prabhu <roopa@cumulusnetworks.com> wrote:
> From: Roopa Prabhu <roopa@cumulusnetworks.com>
>
> The non-json output prints 'None' for such vlans.
> And this can garble json output.
>
> Fixes: d82a49ce85f0 ("bridge: add json support for bridge vlan show")
> Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Applied
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-08-08 15:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-07 19:37 [PATCH iproute2] bridge: vlan json: skip ports with empty vlans Roopa Prabhu
2016-08-08 15:43 ` Stephen Hemminger
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.