diff --git a/src/opnsense/mvc/app/controllers/OPNsense/Dnsmasq/forms/general.xml b/src/opnsense/mvc/app/controllers/OPNsense/Dnsmasq/forms/general.xml index 8cac0007c..42b63d73e 100644 --- a/src/opnsense/mvc/app/controllers/OPNsense/Dnsmasq/forms/general.xml +++ b/src/opnsense/mvc/app/controllers/OPNsense/Dnsmasq/forms/general.xml @@ -139,6 +139,12 @@ checkbox Should be set when dnsmasq is definitely the only DHCP server on a network. For DHCPv4, it changes the behaviour from strict RFC compliance so that DHCP requests on unknown leases from unknown hosts are not ignored. + + dnsmasq.dhcp_reply_delay + + text + Delays sending DHCPOFFER and PROXYDHCP replies for at least the specified number of seconds. This can be practical for split dhcp solutions, to make sure the secondary server answers slower than the primary. + dnsmasq.dhcp_default_fw_rules diff --git a/src/opnsense/mvc/app/models/OPNsense/Dnsmasq/Dnsmasq.xml b/src/opnsense/mvc/app/models/OPNsense/Dnsmasq/Dnsmasq.xml index 2e747ac76..e72ec3efe 100644 --- a/src/opnsense/mvc/app/models/OPNsense/Dnsmasq/Dnsmasq.xml +++ b/src/opnsense/mvc/app/models/OPNsense/Dnsmasq/Dnsmasq.xml @@ -45,6 +45,10 @@ Y 1 + + 0 + 60 + Y 1 diff --git a/src/opnsense/service/templates/OPNsense/Dnsmasq/dnsmasq.conf b/src/opnsense/service/templates/OPNsense/Dnsmasq/dnsmasq.conf index ebd3be79f..9ff6e71aa 100644 --- a/src/opnsense/service/templates/OPNsense/Dnsmasq/dnsmasq.conf +++ b/src/opnsense/service/templates/OPNsense/Dnsmasq/dnsmasq.conf @@ -25,6 +25,19 @@ interface={{helpers.physical_interfaces(dnsmasq.interface.split(','))|join(',')} no-dhcp-interface={{helpers.physical_interfaces(dnsmasq.no_dhcp_interface.split(','))|join(',')}} {% endif %} +{% if dnsmasq.dhcp_lease_max %} +dhcp-lease-max={{dnsmasq.dhcp_lease_max}} +{% endif %} + +{% if dnsmasq.dhcp_fqdn == '1' %} +dhcp-fqdn +{% endif %} + +{% if dnsmasq.dhcp_reply_delay %} +dhcp-reply-delay={{dhcp_reply_delay}} +{% endif %} + + {% if dnsmasq.strictbind == '1' %} # On systems which support it, dnsmasq binds the wildcard address, # even when it is listening on only some interfaces. It then discards @@ -103,9 +116,9 @@ dhcp-range={% %}set:{{dhcp_range.set_tag|replace('-','')}},{% endif %}{{dhcp_range.start_addr}},{% - if dhcp_range.mode != '' -%}{{dhcp_range.mode}},{% - elif dhcp_range.end_addr + if dhcp_range.mode +%}{{dhcp_range.mode}},{% endif %}{% + if dhcp_range.end_addr %}{{ dhcp_range.end_addr }},{% endif %}{{dhcp_range.lease_time|default('86400')}} @@ -133,3 +146,5 @@ dhcp-match=set:{{match.set_tag.replace('-','')}},{{match.option}}{%if match.valu {% if dnsmasq.no_ident == '1' %} no-ident {% endif %} + +