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

addons: bridge: bridge_vlan_aware_list is now a set()

in the case of ifreload bridge.py:get_dependent is entered twice,
once for the old ifaceobjs and once for the new ones. Thus adding
bridges twice to the list. Having a set will prevent this issue.

Signed-off-by: Julien Fortin <jfortin@nvidia.com>
This commit is contained in:
Julien Fortin
2021-04-15 00:33:31 +02:00
parent c38ff73d90
commit 995c38e29a
2 changed files with 2 additions and 2 deletions

View File

@@ -1029,7 +1029,7 @@ class bridge(Bridge, moduleBase):
ifaceobj.link_privflags |= ifaceLinkPrivFlags.BRIDGE_VLAN_AWARE
# store the name of all bridge vlan aware in a global list
self.bridge_vlan_aware_list.append(ifaceobj.name)
self.bridge_vlan_aware_list.add(ifaceobj.name)
ifaceobj.role |= ifaceRole.MASTER
ifaceobj.dependency_type = ifaceDependencyType.MASTER_SLAVE

View File

@@ -93,7 +93,7 @@ class Addon(Netlink, Cache):
class Bridge(Addon):
bridge_vlan_aware_list = []
bridge_vlan_aware_list = set()
def __init__(self):
super(Bridge, self).__init__()