From f4764e0f96e71e4e4f8f0f2fb407ec519ab2ec50 Mon Sep 17 00:00:00 2001 From: Adrien Banlin Date: Mon, 4 Apr 2022 17:10:21 +0200 Subject: [PATCH] addons: address: add dad handling module global Upon ipv6_dad_handling_enabled module global parameter set to true, the address addon will handle ipv6 dad tentatives by either * set nodad when adding an ipv6 address * waiting for dad to finish or warn of a timeout This handling should be quick close to the ifupdown process. --- ifupdown2/addons/address.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ifupdown2/addons/address.py b/ifupdown2/addons/address.py index c33ebd5..a4e750f 100644 --- a/ifupdown2/addons/address.py +++ b/ifupdown2/addons/address.py @@ -187,6 +187,13 @@ class address(AddonWithIpBlackList, moduleBase): 'enable_l3_iface_forwarding_checks' ) ) + self.ipv6_dad_handling_enabled = utils.get_boolean_from_string( + policymanager.policymanager_api.get_module_globals( + self.__class__.__name__, + 'ipv6_dad_handling_enabled' + ), + default=False + ) self.default_mtu = str(self.__policy_get_default_mtu()) self.default_mgmt_intf_mtu = self.__policy_get_mgmt_intf_mtu()