(dns) enable DNS Resolver on different port while DNS Forwarder is enabled, closes https://github.com/opnsense/core/issues/801

This commit is contained in:
Ad Schellevis 2016-03-05 11:15:52 +01:00
parent b563d1ebcc
commit 9078d7a9e1
2 changed files with 2 additions and 2 deletions

View File

@ -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.");
}

View File

@ -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'])) {