summaryrefslogtreecommitdiff
path: root/data/templates/dhcp-server
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-09-21 20:01:21 +0200
committerChristian Poessinger <christian@poessinger.com>2021-09-21 20:01:21 +0200
commit689d1824d251ea9fbd81bf0c941dbd36e33ef420 (patch)
treeaf2dccf193a3bf7f8034204adb4286d85b130ade /data/templates/dhcp-server
parent7a5edd23864f5eb4d8c40e4e35212d88796656e1 (diff)
downloadvyos-1x-689d1824d251ea9fbd81bf0c941dbd36e33ef420.tar.gz
vyos-1x-689d1824d251ea9fbd81bf0c941dbd36e33ef420.zip
dhcp-server: T3839: support domain-search and ntp-server config per shared-network
Diffstat (limited to 'data/templates/dhcp-server')
-rw-r--r--data/templates/dhcp-server/dhcpd.conf.tmpl12
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!!!