From a6cded3bc1bc38b944fffa79d76ebd190ada5ce1 Mon Sep 17 00:00:00 2001 From: brent s Date: Tue, 12 May 2020 23:12:55 -0400 Subject: [PATCH] okay, let's give this a whack. --- utils/he_ipv6/ref | 3 +++ utils/he_ipv6/tunnelbroker.py | 25 +++++++++++++------------ 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/utils/he_ipv6/ref b/utils/he_ipv6/ref index fa92ac4..4919504 100644 --- a/utils/he_ipv6/ref +++ b/utils/he_ipv6/ref @@ -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 diff --git a/utils/he_ipv6/tunnelbroker.py b/utils/he_ipv6/tunnelbroker.py index eeab364..8cdca55 100644 --- a/utils/he_ipv6/tunnelbroker.py +++ b/utils/he_ipv6/tunnelbroker.py @@ -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))