mirror of
https://github.com/CumulusNetworks/ifupdown2.git
synced 2024-05-06 15:54:50 +00:00
Revert "ifupdown not restoring mstpctl attributes (e.g. bpdufilter, bpduguard) in mstpctl"
This reverts commit bbd11771f5571c67c8f110c2b464817ce31155b9. This introduced an error where if the config has old bridge driver and configures port attributes on the bridge, the attributes are reset to defaults after they are configured by the bridge settings. (cherry picked from commit 651d1980de02fb108975900ed007087d9a79934c)
This commit is contained in:
@ -257,16 +257,8 @@ class mstpctl(moduleBase):
|
||||
for attrname, dstattrname in self._attrs_map.items():
|
||||
try:
|
||||
v = ifaceobj.get_attr_value_first(attrname)
|
||||
if (not v and
|
||||
self.get_mod_subattr(attrname,'default') and
|
||||
(self.mstpctlcmd.get_bridge_attr(ifaceobj.name, dstattrname) !=
|
||||
self.get_mod_subattr(attrname,'default'))):
|
||||
# this happens when customers remove an attribute
|
||||
# and expect the default to be restored with ifreload.
|
||||
v = get_mod_subattr(attrname,'default')
|
||||
elif not v:
|
||||
continue
|
||||
|
||||
if not v:
|
||||
continue
|
||||
if attrname == 'mstpctl-treeprio':
|
||||
self.mstpctlcmd.set_bridge_treeprio(ifaceobj.name,
|
||||
v, check)
|
||||
@ -313,16 +305,8 @@ class mstpctl(moduleBase):
|
||||
# set bridge port attributes
|
||||
for attrname, dstattrname in self._port_attrs_map.items():
|
||||
attrval = ifaceobj.get_attr_value_first(attrname)
|
||||
if (not attrval and
|
||||
self.get_mod_subattr(attrname,'default') and
|
||||
(self.mstpctlcmd.get_bridgeport_attr(bridgename, ifaceobj.name,dstattrname) !=
|
||||
self.get_mod_subattr(attrname,'default'))):
|
||||
# this happens when customers remove an attribute
|
||||
# and expect the default to be restored with ifreload.
|
||||
attrval = self.get_mod_subattr(attrname,'default')
|
||||
elif not attrval:
|
||||
continue
|
||||
|
||||
if not attrval:
|
||||
continue
|
||||
if not stp_running_on:
|
||||
# stp may get turned on at a later point
|
||||
self.logger.info('%s: ignoring %s config'
|
||||
|
Reference in New Issue
Block a user