RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1868467 - bridge outputting invalid JSON
Summary: bridge outputting invalid JSON
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: iproute
Version: 8.2
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: 8.0
Assignee: Andrea Claudi
QA Contact: Mingyu Shi
URL:
Whiteboard:
Depends On: 1896011
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-08-12 18:51 UTC by Madison Kelly
Modified: 2021-05-18 15:01 UTC (History)
3 users (show)

Fixed In Version: iproute-5.9.0-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-18 15:00:18 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Network config details (8.94 KB, text/plain)
2020-08-12 18:51 UTC, Madison Kelly
no flags Details
Invalid JSON parse on independent JSON parsing app. (168.43 KB, image/png)
2020-08-12 18:52 UTC, Madison Kelly
no flags Details
verified.log (14.87 KB, text/plain)
2021-01-05 08:35 UTC, Mingyu Shi
no flags Details

Description Madison Kelly 2020-08-12 18:51:21 UTC
Created attachment 1711216 [details]
Network config details

Description of problem:

The output of 'bridge -json -details link show' generates invalid JSON for the given network config and status;

====
[{"ifindex":9,"ifname":"bcn1_bridge1","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"master":"bcn1_bridge1"},{"ifindex":10,"ifname":"ifn1_bridge1","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"master":"ifn1_bridge1"},{"ifindex":11,"ifname":"ifn1_bond1","flags":["BROADCAST","MULTICAST","MASTER","UP","LOWER_UP"],"mtu":1500,"master":"ifn1_bridge1","state":"forwarding","priority":32,"cost":100,"hairpin":false,"guard":false,"root_block":false,"fastleave":false,"learning":true,"flood":true,"mcast_flood":true,"mcast_to_unicast":false,"neigh_suppress":false,"vlan_tunnel":false,"isolated":false,{"ifname":"ifn1_bond1","vlans":[]}},{"ifindex":12,"ifname":"bcn1_bond1","flags":["BROADCAST","MULTICAST","MASTER","UP","LOWER_UP"],"mtu":1500,"master":"bcn1_bridge1","state":"forwarding","priority":32,"cost":100,"hairpin":false,"guard":false,"root_block":false,"fastleave":false,"learning":true,"flood":true,"mcast_flood":true,"mcast_to_unicast":false,"neigh_suppress":false,"vlan_tunnel":false,"isolated":false,{"ifname":"bcn1_bond1","vlans":[]}}]
====

This generates the error in one parser of:

unexpected end of string while parsing JSON string, at character offset 625 (before ""ifname":"ifn1_bond1...")

I verified that the JSON is invalid with http://json.parser.online.fr/ (see attached screen shot).


Version-Release number of selected component (if applicable):

v5.3.0


How reproducible:

100% 


Steps to Reproduce:
1. Configure a machine with 6 interfaces as shown in the network config attachments.
2. Run 'bridge -json -details link show'
3. Validate the output JSON.

Actual results:

Invalid JSON


Expected results:

Valid JSON


Additional info:

Comment 1 Madison Kelly 2020-08-12 18:52:25 UTC
Created attachment 1711217 [details]
Invalid JSON parse on independent JSON parsing app.

Invalid JSON parse on independent JSON parsing app.

Comment 2 Madison Kelly 2020-08-27 22:36:40 UTC
Any update?

Comment 5 Andrea Claudi 2020-11-26 14:29:26 UTC
Hi Madison, sorry for the late reply. This is fixed upstream with commit b262a9becbcb9 ("bridge: Fix output with empty vlan lists"), and the fix will be included in iproute-5.9.0-1.el8 for rhel-8.4.

Comment 6 Madison Kelly 2020-11-26 14:35:10 UTC
Excellent, thanks.

Comment 9 Mingyu Shi 2021-01-05 08:23:56 UTC
Verified iproute-5.9.0-1.el8.x86_64

Comment 10 Mingyu Shi 2021-01-05 08:35:13 UTC
Created attachment 1744517 [details]
verified.log

reproduced with iproute-5.3.0-5.el8.x86_64, verified with iproute-5.9.0-1.el8.x86_64

Comment 12 errata-xmlrpc 2021-05-18 15:00:18 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (iproute bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2021:1653


Note You need to log in before you can comment on or make changes to this bug.