summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordoktornotor <notordoktor@gmail.com>2017-02-22 01:02:56 +0100
committerRenato Botelho <renato@netgate.com>2017-02-22 13:09:16 -0300
commit7ff16d90018b0345b119264140fa90b85329438b (patch)
treec938eaa8c01431d90eb53202f6e7dd943c077602
parent809022b9c0e4fb96a3c3d9cecc20c3cd7b28ff6d (diff)
downloadpfsense-7ff16d90018b0345b119264140fa90b85329438b.zip
pfsense-7ff16d90018b0345b119264140fa90b85329438b.tar.gz
Only allow the DHCP registration options to be enabled when DHCP server is enabled as well
(cherry picked from commit 13fca9bcb3fdecfb6f9707e621b49f89569abfd7)
-rw-r--r--src/usr/local/www/services_dnsmasq.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/usr/local/www/services_dnsmasq.php b/src/usr/local/www/services_dnsmasq.php
index a18b3c8..06bcfb1 100644
--- a/src/usr/local/www/services_dnsmasq.php
+++ b/src/usr/local/www/services_dnsmasq.php
@@ -66,6 +66,7 @@
require_once("guiconfig.inc");
require_once("functions.inc");
require_once("filter.inc");
+require_once("pfsense-utils.inc");
require_once("shaper.inc");
require_once("system.inc");
@@ -178,6 +179,10 @@ if ($_POST) {
}
}
+ if ((isset($_POST['regdhcp']) || isset($_POST['regdhcpstatic']) || isset($_POST['dhcpfirst'])) && !is_dhcp_server_enabled()) {
+ $input_errors[] = gettext("DHCP Server must be enabled for DHCP Registration to work in DNS Forwarder.");
+ }
+
if ($_POST['port']) {
if (is_port($_POST['port'])) {
$config['dnsmasq']['port'] = $_POST['port'];
OpenPOWER on IntegriCloud