diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-09-21 20:01:21 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-09-21 22:12:49 +0200 |
commit | 10a71d6d0534810c314010adc22ae7265334647c (patch) | |
tree | d8870a3f5a053c036356b44b037322375678b384 /data/templates | |
parent | 6fe3f5ad74456065bb841d89aa11f126243eeaab (diff) | |
download | vyos-1x-10a71d6d0534810c314010adc22ae7265334647c.tar.gz vyos-1x-10a71d6d0534810c314010adc22ae7265334647c.zip |
dhcp-server: T3839: support domain-search and ntp-server config per shared-network
(cherry picked from commit 689d1824d251ea9fbd81bf0c941dbd36e33ef420)
Diffstat (limited to 'data/templates')
-rw-r--r-- | data/templates/dhcp-server/dhcpd.conf.tmpl | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/data/templates/dhcp-server/dhcpd.conf.tmpl b/data/templates/dhcp-server/dhcpd.conf.tmpl index d774b4827..003c585dd 100644 --- a/data/templates/dhcp-server/dhcpd.conf.tmpl +++ b/data/templates/dhcp-server/dhcpd.conf.tmpl @@ -72,6 +72,12 @@ shared-network {{ network | replace('_','-') }} { {% if network_config.domain_name is defined and network_config.domain_name is not none %} option domain-name "{{ network_config.domain_name }}"; {% endif %} +{% if network_config.domain_search is defined and network_config.domain_search is not none %} + option domain-search "{{ network_config.domain_search | join('", "') }}"; +{% endif %} +{% if network_config.ntp_server is defined and network_config.ntp_server is not none %} + option ntp-servers {{ network_config.ntp_server | join(', ') }}; +{% endif %} {% if network_config.ping_check is defined %} ping-check true; {% endif %} @@ -88,6 +94,9 @@ shared-network {{ network | replace('_','-') }} { {% if subnet_config.name_server is defined and subnet_config.name_server is not none %} option domain-name-servers {{ subnet_config.name_server | join(', ') }}; {% endif %} +{% if subnet_config.domain_name is defined and subnet_config.domain_name is not none %} + option domain-name "{{ subnet_config.domain_name }}"; +{% endif %} {% if subnet_config.domain_search is defined and subnet_config.domain_search is not none %} option domain-search "{{ subnet_config.domain_search | join('", "') }}"; {% endif %} @@ -129,9 +138,6 @@ shared-network {{ network | replace('_','-') }} { {% if subnet_config.server_identifier is defined and subnet_config.server_identifier is not none %} option dhcp-server-identifier {{ subnet_config.server_identifier }}; {% endif %} -{% if subnet_config.domain_name is defined and subnet_config.domain_name is not none %} - option domain-name "{{ subnet_config.domain_name }}"; -{% endif %} {% if subnet_config.subnet_parameters is defined and subnet_config.subnet_parameters is not none %} # The following {{ subnet_config.subnet_parameters | length }} line(s) were added as # subnet-parameters in the CLI and have not been validated!!! |