try to remove the address first

This commit is contained in:
brent s. 2020-05-15 03:17:53 -04:00
parent 881a8c9317
commit c877868c33
Signed by: bts
GPG Key ID: 8C004C2F93481F6B
1 changed files with 9 additions and 0 deletions

View File

@ -159,6 +159,15 @@ class TunnelBroker(object):
raise e
# The SLAAC prefixes.
for b in assignment.iface_blocks:
try:
ipr.addr('del',
index = assignment.iface_idx,
address = b.str,
mask = b.prefixlen,
family = socket.AF_INET6)
logger.debug('Removed {0} with prefix {1} from {2}.'.format(b.str, b.prefixlen, assignment.iface))
except Exception as e:
pass
try:
ipr.addr('add',
index = assignment.iface_idx,