summaryrefslogtreecommitdiff
path: root/data/templates/dhcp-server
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-09-19 11:14:43 +0200
committerChristian Poessinger <christian@poessinger.com>2021-09-19 12:28:31 +0200
commita00f3bfd0ff580625f63f024bdce9ed55100d63d (patch)
treed66cc255f5b042db52f56620db7ed9d039b2426a /data/templates/dhcp-server
parenta672c7c012b85cd2950403400900453aa318613b (diff)
downloadvyos-1x-a00f3bfd0ff580625f63f024bdce9ed55100d63d.tar.gz
vyos-1x-a00f3bfd0ff580625f63f024bdce9ed55100d63d.zip
dhcp-server: T3841: add option to perform ICMP check before address assignment
(cherry picked from commit 83ea0cb273e29db22062cc133b6eabd4ba2761c7)
Diffstat (limited to 'data/templates/dhcp-server')
-rw-r--r--data/templates/dhcp-server/dhcpd.conf.tmpl6
1 files changed, 6 insertions, 0 deletions
diff --git a/data/templates/dhcp-server/dhcpd.conf.tmpl b/data/templates/dhcp-server/dhcpd.conf.tmpl
index 9aeaafcc2..11482c1ec 100644
--- a/data/templates/dhcp-server/dhcpd.conf.tmpl
+++ b/data/templates/dhcp-server/dhcpd.conf.tmpl
@@ -70,6 +70,9 @@ shared-network {{ network | replace('_','-') }} {
{% if network_config.authoritative is defined %}
authoritative;
{% endif %}
+{% if network_config.ping_check is defined %}
+ ping-check true;
+{% endif %}
{% if network_config.shared_network_parameters is defined and network_config.shared_network_parameters is not none %}
# The following {{ network_config.shared_network_parameters | length }} line(s)
# were added as shared-network-parameters in the CLI and have not been validated
@@ -157,6 +160,9 @@ shared-network {{ network | replace('_','-') }} {
default-lease-time {{ subnet_config.lease }};
max-lease-time {{ subnet_config.lease }};
{% endif %}
+{% if network_config.ping_check is not defined and subnet_config.ping_check is defined %}
+ ping-check true;
+{% endif %}
{% if subnet_config.static_mapping is defined and subnet_config.static_mapping is not none %}
{% for host, host_config in subnet_config.static_mapping.items() if host_config.disable is not defined %}
host {{ host | replace('_','-') if host_decl_name is defined else network | replace('_','-') + '_' + host | replace('_','-') }} {