diff --git a/utils/he_ipv6/tpl/dnsmasq.include.j2 b/utils/he_ipv6/tpl/dnsmasq.include.j2 index cd7677a..6e311d5 100644 --- a/utils/he_ipv6/tpl/dnsmasq.include.j2 +++ b/utils/he_ipv6/tpl/dnsmasq.include.j2 @@ -36,7 +36,7 @@ ra-param = {{ assignment.iface }}, mtu:{{ common_opts.mtu }}, high, {{ common_op dhcp-range = {{ id_set }}, {{ assignment.dhcp6_ranges[assign_loop.index0]|join(', ') }}, {{ ra_opts|join(', ') }}, {{ common_opts.lease_life }} {%- endfor %} {%- else %} -dhcp-range = {{ id_set }}, ::, constructor={{ assignment.iface }}, {{ ra_opts|join(', ') }}, {{ common_opts.lease_life }}{#- TODO: check this. #} +dhcp-range = {{ id_set }}, [::], constructor={{ assignment.iface }}, {{ ra_opts|join(', ') }}, {{ common_opts.lease_life }}{#- TODO: check this. #} {%- endif %} dhcp-option = {{ identifier }}, option6:information-refresh-time, {{ common_opts.opts_life }} {%- if assignment.ra_dns %} diff --git a/utils/he_ipv6/tunnel.py b/utils/he_ipv6/tunnel.py index 19da60d..014ae97 100644 --- a/utils/he_ipv6/tunnel.py +++ b/utils/he_ipv6/tunnel.py @@ -68,12 +68,17 @@ class Assignment(object): self.ra_dns = ra_dns self.ra_tag = ra_tag self.ra_other = ra_other + self.ra_dhcp = ra_dhcp + for a in ('dns', 'tag', 'other', 'dhcp'): + k = 'ra_{0}'.format(a) + v = getattr(self, k) + logger.debug('{0}: {1}'.format(k, v)) self.ra_domains = set() if isinstance(ra_domains, list): self.ra_domains.update(ra_domains) elif isinstance(ra_domains, str): self.ra_domains.update([i.lower().strip() for i in ra_domains if i.strip() != '']) - self.ra_dhcp = ra_dhcp + logger.debug('ra_domains: {0}'.format(', '.join(self.ra_domains))) self.iface = None self.iface_ll = None self.iface_idx = None @@ -122,8 +127,8 @@ class Assignment(object): def parse_alloc(self): self.alloc_block = self.alloc.ip.alloc_block - # NOT AN IP6 OBJECT! self.iface_blocks = self.alloc_block.extract_subnet(self.prefix, count = 1) + logger.debug('Allocation blocks for {0}: {1}'.format(self.iface, ','.join(self.iface_blocks))) for i in self.iface_blocks: # DHCPv6 range. _base = str(i.ip).rstrip(':')