mirror of
https://github.com/CumulusNetworks/ifupdown2.git
synced 2024-05-06 15:54:50 +00:00
addons: bridge: Fix KeyError when 'bridge-pvid' is not in the set 'bridge-vid'
Ticket: CM-11998 Reviewed By: roopa Testing Done: used same config given in bug descreption When we try to unconditionally remove 'pvid' from 'vids' set, we run into KeyError if 'vids' set doesn't contain 'pvid' Example configuration: auto swp9 iface swp9 mstpctl-portautoedge no auto frontnet iface frontnet bridge-vlan-aware yes bridge-ports swp9 bridge-vids 10 bridge-stp on Signed-off-by: Nikhil <nikhil@cumulusnetworks.com>
This commit is contained in:
@@ -513,7 +513,7 @@ class bridge(moduleBase):
|
||||
vids1_ints = self._ranges_to_ints(vids1)
|
||||
vids2_ints = self._ranges_to_ints(vids2)
|
||||
set_diff = Set(vids1_ints).symmetric_difference(vids2_ints)
|
||||
if pvid:
|
||||
if pvid and int(pvid) in set_diff:
|
||||
set_diff = set_diff.remove(int(pvid))
|
||||
if set_diff:
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user