summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBenjamin Poirier <bpoirier@cumulusnetworks.com>2020-05-01 17:47:17 +0900
committerStephen Hemminger <stephen@networkplumber.org>2020-05-04 17:13:53 -0700
commitb262a9becbcb9d0816b7953fd223dd9a7add8e12 (patch)
treeb76c8d935f6be22231ec535d9e0602cb841f2945 /include
parent91b1b49ed3934eb423308130bb3365a0afebf5af (diff)
bridge: Fix output with empty vlan lists
Consider this configuration: ip link add br0 type bridge ip link add vx0 type vxlan dstport 4789 external ip link set dev vx0 master br0 bridge vlan del vid 1 dev vx0 ip link add vx1 type vxlan dstport 4790 external ip link set dev vx1 master br0 root@vsid:/src/iproute2# ./bridge/bridge vlan port vlan-id br0 1 PVID Egress Untagged vx0 None vx1 1 PVID Egress Untagged root@vsid:/src/iproute2# Note the useless and inconsistent empty lines. root@vsid:/src/iproute2# ./bridge/bridge vlan tunnelshow port vlan-id tunnel-id br0 vx0 None vx1 What's the difference between "None" and ""? root@vsid:/src/iproute2# ./bridge/bridge -j -p vlan tunnelshow [ { "ifname": "br0", "tunnels": [ ] },{ "ifname": "vx1", "tunnels": [ ] } ] Why does vx0 appear in normal output and not json output? Why output an empty list for br0 and vx1? Fix these inconsistencies and avoid outputting entries with no values. This makes the behavior consistent with other iproute2 commands, for example `ip -6 addr`: if an interface doesn't have any ipv6 addresses, it is not part of the listing. Fixes: 8652eeb3ab12 ("bridge: vlan: support for per vlan tunnel info") Signed-off-by: Benjamin Poirier <bpoirier@cumulusnetworks.com> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions