Skip to content

Commit

Permalink
address: purge: move warning message
Browse files Browse the repository at this point in the history
  • Loading branch information
aderumier committed May 9, 2023
1 parent 6b1ecf3 commit 825be38
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ifupdown2/addons/address.py
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,6 @@ def process_addresses(self, ifaceobj, ifaceobj_getfunc=None, force_reapply=False
purge_v6_addresses = True
running_accept_ra = self.cache.get_link_inet6_accept_ra(ifaceobj)
if (running_accept_ra == '1' or running_accept_ra == '2') and not squash_addr_config:
self.logger.warning("%s: interface has ipv6 slaac enabled, skip purging existing ipv6 addresses" % ifname)
purge_v6_addresses = False

try:
Expand All @@ -663,6 +662,7 @@ def process_addresses(self, ifaceobj, ifaceobj_getfunc=None, force_reapply=False
if addr in skip_addrs:
continue
if addr.version == 6 and not purge_v6_addresses:
self.logger.warning("%s: interface has ipv6 slaac enabled, skip purging existing ipv6 address %s" % (ifname, addr))
continue
self.netlink.addr_del(ifname, addr)
except Exception as e:
Expand Down

0 comments on commit 825be38

Please sign in to comment.