diff options
-rw-r--r-- | data/templates/dhcpv6-server/dhcpdv6.conf.tmpl | 4 | ||||
-rwxr-xr-x | src/conf_mode/dhcpv6_server.py | 5 |
2 files changed, 4 insertions, 5 deletions
diff --git a/data/templates/dhcpv6-server/dhcpdv6.conf.tmpl b/data/templates/dhcpv6-server/dhcpdv6.conf.tmpl index 80d620fcf..d6b0ae935 100644 --- a/data/templates/dhcpv6-server/dhcpdv6.conf.tmpl +++ b/data/templates/dhcpv6-server/dhcpdv6.conf.tmpl @@ -21,7 +21,7 @@ shared-network {{ network.name }} { range6 {{ range.start }} {{ range.stop }}; {%- endfor %} {%- if subnet.domain_search %} - option dhcp6.domain-search {{ subnet.domain_search | join(', ') }}; + option dhcp6.domain-search "{{ subnet.domain_search | join('", "') }}"; {%- endif %} {%- if subnet.lease_def %} default-lease-time {{ subnet.lease_def }}; @@ -51,7 +51,7 @@ shared-network {{ network.name }} { option dhcp6.sip-servers-addresses {{ subnet.sip_address | join(', ') }}; {%- endif %} {%- if subnet.sip_hostname %} - option dhcp6.sip-servers-names {{ subnet.sip_hostname | join(', ') }}; + option dhcp6.sip-servers-names "{{ subnet.sip_hostname | join('", "') }}"; {%- endif %} {%- if subnet.sntp_server %} option dhcp6.sntp-servers {{ subnet.sntp_server | join(', ') }}; diff --git a/src/conf_mode/dhcpv6_server.py b/src/conf_mode/dhcpv6_server.py index 6bfee94a1..04f2a5997 100755 --- a/src/conf_mode/dhcpv6_server.py +++ b/src/conf_mode/dhcpv6_server.py @@ -122,8 +122,7 @@ def get_config(): # The domain-search option specifies a 'search list' of Domain Names to be used # by the client to locate not-fully-qualified domain names. if conf.exists('domain-search'): - for value in conf.return_values('domain-search'): - subnet['domain_search'].append(f'"{value}"') + subnet['domain_search'] = conf.return_values('domain-search') # IPv6 address valid lifetime # (at the end the address is no longer usable by the client) @@ -172,7 +171,7 @@ def get_config(): if is_ipv6(value): subnet['sip_address'].append(value) else: - subnet['sip_hostname'].append(f'"{value}"') + subnet['sip_hostname'].append(value) # List of local SNTP servers available for the client to synchronize their clocks if conf.exists('sntp-server'): |