AHA. it was choking out on :: for /48s!

This commit is contained in:
brent s. 2020-05-18 07:21:13 -04:00
parent 753d5007d8
commit 50fd503ce6
Signed by: bts
GPG Key ID: 8C004C2F93481F6B

View File

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