summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/templates/dhcp-server/dhcpd.conf.tmpl6
-rw-r--r--interface-definitions/dhcp-server.xml.in2
-rw-r--r--interface-definitions/include/dhcp-ping-check.xml.i8
3 files changed, 16 insertions, 0 deletions
diff --git a/data/templates/dhcp-server/dhcpd.conf.tmpl b/data/templates/dhcp-server/dhcpd.conf.tmpl
index 54fff3ded..c71934426 100644
--- a/data/templates/dhcp-server/dhcpd.conf.tmpl
+++ b/data/templates/dhcp-server/dhcpd.conf.tmpl
@@ -73,6 +73,9 @@ 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.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
@@ -160,6 +163,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('_','-') }} {
diff --git a/interface-definitions/dhcp-server.xml.in b/interface-definitions/dhcp-server.xml.in
index 960b8a4f0..7ff777c43 100644
--- a/interface-definitions/dhcp-server.xml.in
+++ b/interface-definitions/dhcp-server.xml.in
@@ -94,6 +94,7 @@
</properties>
</leafNode>
#include <include/dhcp-domain-name.xml.i>
+ #include <include/dhcp-ping-check.xml.i>
#include <include/name-server-ipv4.xml.i>
#include <include/generic-description.xml.i>
#include <include/generic-disable-node.xml.i>
@@ -210,6 +211,7 @@
<multi/>
</properties>
</leafNode>
+ #include <include/dhcp-ping-check.xml.i>
<leafNode name="pop-server">
<properties>
<help>IP address of POP3 server</help>
diff --git a/interface-definitions/include/dhcp-ping-check.xml.i b/interface-definitions/include/dhcp-ping-check.xml.i
new file mode 100644
index 000000000..0b2a1214a
--- /dev/null
+++ b/interface-definitions/include/dhcp-ping-check.xml.i
@@ -0,0 +1,8 @@
+<!-- include start from dhcp-ping-check.xml.i -->
+<leafNode name="ping-check">
+ <properties>
+ <help>Sends ICMP Echo request to the address being assigned</help>
+ <valueless/>
+ </properties>
+</leafNode>
+<!-- include end -->