From 24cbfd5a63dd86707a565a3e975616ff9fec2ebd Mon Sep 17 00:00:00 2001 From: Chris Buechler Date: Wed, 11 Feb 2015 01:13:17 -0600 Subject: [PATCH] Check if Unbound is enabled and using the same port before allowing dnsmasq to be enabled. part of Ticket #4332 --- usr/local/www/services_dnsmasq.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/usr/local/www/services_dnsmasq.php b/usr/local/www/services_dnsmasq.php index 0361932939..0acb96104d 100644 --- a/usr/local/www/services_dnsmasq.php +++ b/usr/local/www/services_dnsmasq.php @@ -87,6 +87,11 @@ if ($_POST) { $config['dnsmasq']['custom_options'] = str_replace("\r\n", "\n", $_POST['custom_options']); $config['dnsmasq']['strictbind'] = ($_POST['strictbind']) ? true : false; + if (isset($_POST['enable']) && isset($config['unbound']['enable'])) { + if ($_POST['port'] == $config['unbound']['port']) + $input_errors[] = "The DNS Resolver is enabled using this port. Choose a non-conflicting port, or disable DNS Resolver."; + } + if ($_POST['port']) if(is_port($_POST['port'])) $config['dnsmasq']['port'] = $_POST['port'];