diff --git a/src/www/services_dnsmasq.php b/src/www/services_dnsmasq.php index 803ed1fac..c7e1a2761 100644 --- a/src/www/services_dnsmasq.php +++ b/src/www/services_dnsmasq.php @@ -68,7 +68,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { if (!empty($pconfig['port']) && !is_port($pconfig['port'])) { $input_errors[] = gettext("You must specify a valid port number"); } - if (!empty($pconfig['enable']) && isset($config['unbound']['enable'])) { + if (!empty($pconfig['enable']) && isset($config['unbound']['enable']) && (empty($config['unbound']['port']) || $config['unbound']['port'] == '53')) { $input_errors[] = gettext("The DNS Resolver is still active. Disable it before enabling the DNS Forwarder."); } diff --git a/src/www/services_unbound.php b/src/www/services_unbound.php index c1dcfc86f..5b8ad963b 100644 --- a/src/www/services_unbound.php +++ b/src/www/services_unbound.php @@ -67,7 +67,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { exit; } else { // perform validations - if (isset($pconfig['enable']) && isset($config['dnsmasq']['enable'])) { + if (isset($pconfig['enable']) && isset($config['dnsmasq']['enable']) && (empty($pconfig['port']) || $pconfig['port'] == '53')) { $input_errors[] = gettext("The DNS Forwarder is still active. Disable it before enabling the DNS Resolver."); } if (empty($pconfig['active_interface'])) {