let's clean this up

This commit is contained in:
brent s. 2020-05-15 03:07:07 -04:00
parent 1b090c76ce
commit 754fa3eb25
Signed by: bts
GPG Key ID: 8C004C2F93481F6B

View File

@ -148,12 +148,12 @@ class TunnelBroker(object):
try: try:
ipr.addr('add', ipr.addr('add',
index = assignment.iface_idx, index = assignment.iface_idx,
address = a.ip.str, address = a.str,
mask = a.ip.prefix, mask = a.prefix,
family = socket.AF_INET6) family = socket.AF_INET6)
except Exception as e: except Exception as e:
logger.error(('Could not add address {0} on link {1}: ' logger.error(('Could not add address {0} on link {1}: '
'{2}').format(str(a.ip.str), assignment.iface_idx, e)) '{2}').format(a.str, assignment.iface_idx, e))
ipr.close() ipr.close()
raise e raise e
# The SLAAC prefixes. # The SLAAC prefixes.
@ -161,12 +161,12 @@ class TunnelBroker(object):
try: try:
ipr.addr('add', ipr.addr('add',
index = assignment.iface_idx, index = assignment.iface_idx,
address = str(b.ip), address = b.str,
mask = b.prefixlen, mask = b.prefixlen,
family = socket.AF_INET6) family = socket.AF_INET6)
except Exception as e: except Exception as e:
logger.error(('Could not add address block {0} on link {1}: ' logger.error(('Could not add address block {0} on link {1}: '
'{2}').format(str(b), assignment.iface_idx, e)) '{2}').format(b.str, assignment.iface_idx, e))
ipr.close() ipr.close()
raise e raise e
ipr.close() ipr.close()