diff --git a/src/www/services_dnsmasq.php b/src/www/services_dnsmasq.php index 058cd207c..fca72cb18 100644 --- a/src/www/services_dnsmasq.php +++ b/src/www/services_dnsmasq.php @@ -72,8 +72,12 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { if (!empty($pconfig['dns_forward_max']) && !is_numericint($pconfig['dns_forward_max'])) { $input_errors[] = gettext("You must specify a valid maximum number of DNS queries"); } - if (isset($pconfig['cache_size']) && $pconfig['cache_size'] !== '' && !is_numericint($pconfig['cache_size'])) { - $input_errors[] = gettext("You must specify a valid cache size"); + if (isset($pconfig['cache_size']) && $pconfig['cache_size'] !== '') { + if (!is_numericint($pconfig['cache_size'])) { + $input_errors[] = gettext("You must specify a valid cache size"); + } elseif (!empty($pconfig['dnssec']) && $pconfig['cache_size'] < 150) { + $input_errors[] = gettext("You must specify a valid cache size of at least 150 when DNSSEC is enabled"); + } } if (isset($pconfig['local_ttl']) && $pconfig['local_ttl'] !== '' && !is_numericint($pconfig['local_ttl'])) { $input_errors[] = gettext("You must specify a valid TTL for local DNS"); @@ -421,9 +425,9 @@ $( document ).ready(function() {