View Issue Details

IDProjectCategoryView StatusLast Update
0016533CentOS-8iproutepublic2019-10-04 08:21
Status newResolutionopen 
Platformx86_64OSlinuxOS Versioncentos8
Product Version8.0.1905 
Target VersionFixed in Version 
Summary0016533: bridge -j vlan show output invalid json
DescriptionWe are using bridge -j option to output parseable output from our tools configuring linux-bridges with vlan-filtering, but the output at centos8 is an invalid json also at centos7 it was totally fine.
Steps To Reproducerpm version: iproute-4.18.0-11.el8.x86_64

bridge -j vlan show outputs invalid json

Running inside a centos:8 docker container with "docker run --privileged=true -it centos:8 /bin/bash"

[root@bed1c2009bd8 /]# ip link add br0 type bridge
[root@bed1c2009bd8 /]# ip link set br0 up
[root@bed1c2009bd8 /]# ip link set br0 type bridge vlan_filtering 1
[root@bed1c2009bd8 /]# bridge vlan show
port vlan ids
     1 PVID untagged
[root@bed1c2009bd8 /]# bridge -j vlan show

The correct output format need structs to be with brackets:

Additional InformationAlso same thing at centos:7 has better output, since network interfaces are struct fields too:

[root@69aabb0f165e /]# bridge vlan show
port vlan ids
br0 1 PVID Egress Untagged

[root@69aabb0f165e /]# bridge -j vlan show
    "br0": [{
            "vlan": 1,
            "flags": ["PVID","Egress Untagged"

Tagsbridge json vlan_filtering vlan


There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2019-10-04 08:21 ellorent New Issue
2019-10-04 08:21 ellorent Tag Attached: bridge json vlan_filtering vlan