1
0
mirror of https://github.com/CumulusNetworks/ifupdown2.git synced 2024-05-06 15:54:50 +00:00

ifupdownaddons: iproute2: fix 'ifquery -c' fail for 'bridge-pvid' on bridge ports

Ticket: CM-11624
Reviewed By: roopa, julien
Testing Done: using configuration mentioned in the bug

This patch fixes 'ifquery -c' failure for 'bridge-pvid' on
all bridge ports.

The following format of '/sbin/bridge -c vlan show' output was not handled properly
by iproute2

port  vlan ids
swp1   600
       700-710
       711 PVID Egress Untagged
       712-900

iproute2 was parsing the '/sbin/bridge -c vlan show' output with the assumption that
pvid line '711 PVID Egress Untagged' appears before all the vland ids.

Something like this:
port  vlan ids
swp1   711 PVID Egress Untagged
       600
       700-710
       712-900

Signed-off-by: Nikhil <nikhil@cumulusnetworks.com>
This commit is contained in:
Nikhil
2016-07-01 23:07:19 -07:00
parent 22945dd634
commit c4eac60d6d
2 changed files with 12 additions and 20 deletions

View File

@@ -514,7 +514,7 @@ class bridge(moduleBase):
vids2_ints = self._ranges_to_ints(vids2)
set_diff = Set(vids1_ints).symmetric_difference(vids2_ints)
if pvid:
set_diff = set_diff.remove(pvid)
set_diff = set_diff.remove(int(pvid))
if set_diff:
return False
else: