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

ifupdown2 defaults for link attributes are not applied

Ticket: CM-11718
Reviewed By: CCR-4931
Testing Done: Tested complete regression suite on hardnode in 3.0.

This patch fixes a problem in the ethtool addon module where a single iface stanza was
configured for a link-speed (1G) other then the default (10G). The link-speed config is then
removed or commented out but the link-speed is not restored to its default value (10G) because of
incorrect logic.
This commit is contained in:
Sam Tannous
2016-07-07 17:16:22 -07:00
parent 32a74516d1
commit 45c264cd8d

View File

@ -93,11 +93,12 @@ class ethtool(moduleBase,utilsBase):
(ifaceobj.name in self.ifaceobjs_modified_configs)):
continue
# if we are not the oldest and we have no configs, do not change anything
# the only way a non-oldest sibling would change values is if it
# had configured settings
if (not ((ifaceobj.flags & iface.HAS_SIBLINGS) and
(ifaceobj.flags & iface.OLDEST_SIBLING)) and
# If we have siblings AND are not the oldest AND we have no configs,
# do not change anything. The only way a non-oldest sibling would
# change values is if it had configured settings. iface stanzas may
# not be squashed if addr_config_squash is not set so we still need this.
if ((ifaceobj.flags & iface.HAS_SIBLINGS) and
not (ifaceobj.flags & iface.OLDEST_SIBLING) and
not config_val):
continue