mirror of
https://github.com/CumulusNetworks/ifupdown2.git
synced 2024-05-06 15:54:50 +00:00
addons: address: get new dad attributes
dad-attempts and dad-interval can now be taken from the interfaces file. Those attributes names came from ifupdown (original).
This commit is contained in:
@@ -477,11 +477,16 @@ class address(AddonWithIpBlackList, moduleBase):
|
||||
else:
|
||||
addr_obj = ipnetwork.IPNetwork(addr)
|
||||
|
||||
for attr_name in ("broadcast", "scope", "preferred-lifetime"):
|
||||
for attr_name in ("broadcast", "scope", "preferred-lifetime", 'dad-attempts', 'dad-interval'):
|
||||
attr_value = ifaceobj.get_attr_value_n(attr_name, index)
|
||||
if attr_value:
|
||||
addr_attributes[attr_name] = attr_value
|
||||
|
||||
if addr_obj.version == 4 and any(dad in addr_attributes for dad in ('dad-attempts', 'dad-interval')):
|
||||
self.logger.warning("%s: dad options is only available for ipv6", ifaceobj.name)
|
||||
addr_attributes.pop('dad-attempts', None)
|
||||
addr_attributes.pop('dad-interval', None)
|
||||
|
||||
pointopoint = ifaceobj.get_attr_value_n("pointopoint", index)
|
||||
try:
|
||||
if pointopoint:
|
||||
|
Reference in New Issue
Block a user