okay, let's give this a whack.

This commit is contained in:
2020-05-12 23:12:55 -04:00
parent 422a69ff41
commit a6cded3bc1
2 changed files with 16 additions and 12 deletions

View File

@@ -106,6 +106,17 @@ class TunnelBroker(object):
'{2}').format(self.iface_name, self.iface_idx, e))
ipr.close()
raise e
try:
ipr.route('add',
dst = 'default',
# gateway = self.def_rt_ip,
oif = self.iface_idx,
family = socket.AF_INET6)
logger.debug('Added default route for link {0}.'.format(self.iface_name))
except Exception as e:
logger.error(('Could not add default IPv6 route on link {0}: {1}').format(self.iface_name, e))
ipr.close()
raise e
for alloc in self.tun.allocations:
try:
ipr.addr('add',
@@ -118,17 +129,7 @@ class TunnelBroker(object):
'{2}').format(str(alloc.ip.str), alloc.iface_idx, e))
ipr.close()
raise e
try:
ipr.route('add',
dst = 'default',
gateway = self.def_rt_ip,
oif = self.iface_idx,
family = socket.AF_INET6)
logger.debug('Added default route for link {0}.'.format(self.iface_name))
except Exception as e:
logger.error(('Could not add default IPv6 route on link {0}: {1}').format(self.iface_name, e))
ipr.close()
raise e
# Is this necessary?
# try:
# ipr.route('add',
# dst = '::/96',
@@ -152,7 +153,7 @@ class TunnelBroker(object):
try:
ipr.route('del',
dst = 'default',
gateway = self.def_rt_ip,
# gateway = self.def_rt_ip,
oif = self.iface_idx,
family = socket.AF_INET6)
logger.debug('Removed default route for link {0}.'.format(self.iface_name))