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

addons: address: process hwaddress before processing ip addresses

Signed-off-by: Julien Fortin <jfortin@nvidia.com>
This commit is contained in:
Julien Fortin
2022-09-20 02:29:10 +02:00
parent aa656ad315
commit 86bd267c63

View File

@ -1079,6 +1079,11 @@ class address(AddonWithIpBlackList, moduleBase):
self.process_mtu(ifaceobj, ifaceobj_getfunc)
self.up_ipv6_addrgen(ifaceobj)
try:
hwaddress, old_mac_addr = self.process_hwaddress(ifaceobj)
except Exception as e:
self.log_error('%s: %s' % (ifaceobj.name, str(e)), ifaceobj)
if addr_method not in ["dhcp", "ppp"]:
self.process_addresses(ifaceobj, ifaceobj_getfunc, force_reapply)
else:
@ -1091,7 +1096,7 @@ class address(AddonWithIpBlackList, moduleBase):
try:
# Handle special things on a bridge
self._process_bridge(ifaceobj, True, *self.process_hwaddress(ifaceobj))
self._process_bridge(ifaceobj, True, hwaddress, old_mac_addr)
except Exception as e:
self.log_error('%s: %s' % (ifaceobj.name, str(e)), ifaceobj)