From 276aa019281923c6f5599cc790461e7d34d8e60f Mon Sep 17 00:00:00 2001 From: brent s Date: Sun, 10 May 2020 19:16:26 -0400 Subject: [PATCH] bit more. i think i need to add both the allocations and the client ip --- utils/he_ipv6.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/utils/he_ipv6.py b/utils/he_ipv6.py index 0990239..975dd34 100755 --- a/utils/he_ipv6.py +++ b/utils/he_ipv6.py @@ -182,6 +182,21 @@ class TunnelBroker(object): logger.error(('Could not add address {0} on link {1}: ' '{2}').format(str(self.addr), self.iface_name, e)) raise e + for a in self.allocations: + try: + _addr = next(a.hosts()) + self.ipr.addr('add', + index = self.iface_idx, + address = str(_addr), + mask = a.prefixlen, + family = socket.AF_INET6) + logger.debug('Added address {0} to link {1} with prefix {2}.'.format(str(_addr), + self.iface_name, + a.prefixlen)) + except Exception as e: + logger.error(('Could not add address {0} on link {1}: ' + '{2}').format(str(self.addr), self.iface_name, e)) + raise e try: self.ipr.route('add', dst = 'default', oif = self.iface_idx, family = socket.AF_INET6) logger.debug('Added default route for link {0}.'.format(self.iface_name))