summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www
diff options
context:
space:
mode:
authordoktornotor <notordoktor@gmail.com>2017-02-22 01:03:59 +0100
committerGitHub <noreply@github.com>2017-02-22 01:03:59 +0100
commitc6d03f09e035806dca8ac3314b41a3eaf523ab3f (patch)
tree74ccdb52a754cf747a604499e4bbdc5d13d59a65 /src/usr/local/www
parent13fca9bcb3fdecfb6f9707e621b49f89569abfd7 (diff)
downloadpfsense-c6d03f09e035806dca8ac3314b41a3eaf523ab3f.zip
pfsense-c6d03f09e035806dca8ac3314b41a3eaf523ab3f.tar.gz
Only allow the DHCP registration options to be enabled when DHCP server is enabled as well
Diffstat (limited to 'src/usr/local/www')
-rw-r--r--src/usr/local/www/services_unbound.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/usr/local/www/services_unbound.php b/src/usr/local/www/services_unbound.php
index 5c3caa1..e000057 100644
--- a/src/usr/local/www/services_unbound.php
+++ b/src/usr/local/www/services_unbound.php
@@ -29,6 +29,7 @@
require_once("guiconfig.inc");
require_once("unbound.inc");
+require_once("pfsense-utils.inc");
require_once("system.inc");
if (!is_array($config['unbound'])) {
@@ -153,6 +154,10 @@ if ($_POST['save']) {
$pconfig['active_interface'] = implode(",", $pconfig['active_interface']);
}
+ if ((isset($pconfig['regdhcp']) || isset($pconfig['regdhcpstatic'])) && !is_dhcp_server_enabled()) {
+ $input_errors[] = gettext("DHCP Server must be enabled for DHCP Registration to work in DNS Resolver.");
+ }
+
$display_custom_options = $pconfig['custom_options'];
$pconfig['custom_options'] = base64_encode(str_replace("\r\n", "\n", $pconfig['custom_options']));
OpenPOWER on IntegriCloud