diff --git a/utils/he_ipv6/tunnel.py b/utils/he_ipv6/tunnel.py index 8237f05..cd134c2 100644 --- a/utils/he_ipv6/tunnel.py +++ b/utils/he_ipv6/tunnel.py @@ -129,15 +129,15 @@ class Assignment(object): self.alloc_block = self.alloc.ip.alloc_block self.iface_blocks = self.alloc_block.extract_subnet(self.prefix, count = 1) logger.debug('Allocation blocks for {0}: {1}'.format(self.iface, ','.join([str(i) for i in self.iface_blocks]))) - for i in self.iface_blocks: + for idx, i in enumerate(self.iface_blocks): # DHCPv6 range. - _base = str(i.ip).rstrip(':') + _base = '{0}:{1}'.format(str(i.ip).rstrip(':'), idx) logger.debug('Base prefix for {0}: {1}'.format(str(i), _base)) start = '{0}:dead:beef:cafe:0'.format(_base) stop = '{0}:dead:beef:cafe:ffff'.format(_base) - range = (start, stop) - self.dhcp6_ranges.append(range) - logger.debug('Added range {0} to block {1} for iface {2}'.format(range, str(i.ip), self.iface)) + d_range = (start, stop) + self.dhcp6_ranges.append(d_range) + logger.debug('Added range {0} to block {1} for iface {2}'.format(d_range, str(i.ip), self.iface)) return(None)