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

ifupdown2 should allow speed setting even with duplicate iface stanzas

Ticket: CM-6740
Reviewed By: roopa
Testing Done: tested multiple ifreloads with various test cases

In the case of duplicate iface stanzas where one of the stanzas sets
the link attributes, ifupdown2 was confused because the absence
of link attributes forced it to reset them to default values
(when they existed).

This patch tracks link changes and prevents resetting to defaults
only if there are no explicit settings configured.  Furthermore,
only the last interface processed (from the duplicates) will take
care of resetting to defaults.
This commit is contained in:
Sam Tannous
2015-10-20 13:49:07 -04:00
parent 1042b7096d
commit 7444feea6d
3 changed files with 39 additions and 4 deletions

View File

@@ -291,10 +291,11 @@ class iface():
"""
# flag to indicate that the object was created from pickled state
_PICKLED = 0x00000001
HAS_SIBLINGS = 0x00000010
_PICKLED = 0x00000001
HAS_SIBLINGS = 0x00000010
IFACERANGE_ENTRY = 0x00000100
IFACERANGE_START = 0x00001000
OLDEST_SIBLING = 0x00010000
version = '0.1'