From 8d20ad4a909ec5e512ca17965a5bbbc7f33c24b6 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 6 Dec 2020 12:02:33 +0100 Subject: dhcp: T3113: bugfix for multiple domain-search entries While rewriting the code to get_config_dict() in commit 84b7ade286 ("dhcp: T3100: migrate server configuration to get_config_dict()") a regression was added not properly joining strings when multiple search-somains had been given. Wrong: domain-search "domain1, domain2"; Correct: domain-search "domain1", "domain2"; --- data/templates/dhcp-server/dhcpd.conf.tmpl | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'data/templates') diff --git a/data/templates/dhcp-server/dhcpd.conf.tmpl b/data/templates/dhcp-server/dhcpd.conf.tmpl index e8425aa6c..bcf425abd 100644 --- a/data/templates/dhcp-server/dhcpd.conf.tmpl +++ b/data/templates/dhcp-server/dhcpd.conf.tmpl @@ -4,7 +4,6 @@ # https://www.isc.org/wp-content/uploads/2017/08/dhcp43options.html # # log-facility local7; - {% if hostfile_update is defined %} on release { set ClientName = pick-first-value(host-decl-name, option fqdn.hostname, option host-name); @@ -13,7 +12,6 @@ on release { set ClientDomain = pick-first-value(config-option domain-name, "..YYZ!"); execute("/usr/libexec/vyos/system/on-dhcp-event.sh", "release", ClientName, ClientIp, ClientMac, ClientDomain); } - on expiry { set ClientName = pick-first-value(host-decl-name, option fqdn.hostname, option host-name); set ClientIp = binary-to-ascii(10, 8, ".",leased-address); @@ -25,7 +23,6 @@ on expiry { {{ 'use-host-decl-names on;' if host_decl_name is defined }} ddns-update-style {{ 'interim' if dynamic_dns_update is defined else 'none' }}; - option rfc3442-static-route code 121 = array of integer 8; option windows-static-route code 249 = array of integer 8; option wpad-url code 252 = text; @@ -87,7 +84,7 @@ shared-network {{ network | replace('_','-') }} { option domain-name-servers {{ subnet_config.dns_server | join(', ') }}; {% endif %} {% if subnet_config.domain_search is defined and subnet_config.domain_search is not none %} - option domain-search "{{ subnet_config.domain_search | join(', ') }}"; + option domain-search "{{ subnet_config.domain_search | join('", "') }}"; {% endif %} {% if subnet_config.ntp_server is defined and subnet_config.ntp_server is not none %} option ntp-servers {{ subnet_config.ntp_server | join(', ') }}; -- cgit v1.2.3