Commit 9078d7a9 authored by Ad Schellevis's avatar Ad Schellevis

(dns) enable DNS Resolver on different port while DNS Forwarder is enabled,...

(dns) enable DNS Resolver on different port while DNS Forwarder is enabled, closes https://github.com/opnsense/core/issues/801
parent b563d1eb
......@@ -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.");
}
......
......@@ -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'])) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment