okay, let's give this a whack.

This commit is contained in:
brent s. 2020-05-12 23:12:55 -04:00
parent 422a69ff41
commit a6cded3bc1
Signed by: bts
GPG Key ID: 8C004C2F93481F6B
2 changed files with 16 additions and 12 deletions

View File

@ -2,3 +2,6 @@
# https://forums.he.net/index.php?topic=3153.0
# https://gist.github.com/pklaus/960672
# https://shorewall.org/6to4.htm#idm143
# https://genneko.github.io/playing-with-bsd/networking/freebsd-tunnelv6-he
# https://journeymangeek.com/?p=228
# https://superuser.com/questions/1441598/using-a-hurricane-electric-tunnel-to-provide-ips-to-a-network-with-dnsmasq/1441604#1441604

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))