summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordoktornotor <notordoktor@gmail.com>2017-02-22 01:02:56 +0100
committerGitHub <noreply@github.com>2017-02-22 01:02:56 +0100
commit13fca9bcb3fdecfb6f9707e621b49f89569abfd7 (patch)
treee409fb7bfcb16ffabbbbacea56626f5d26bcd459
parent3d8b01e8c6392b4177572d540c8160c7e6e071ca (diff)
downloadpfsense-13fca9bcb3fdecfb6f9707e621b49f89569abfd7.zip
pfsense-13fca9bcb3fdecfb6f9707e621b49f89569abfd7.tar.gz
Only allow the DHCP registration options to be enabled when DHCP server is enabled as well
-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 c834457..ff664e5 100644
--- a/src/usr/local/www/services_dnsmasq.php
+++ b/src/usr/local/www/services_dnsmasq.php
@@ -34,6 +34,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");
@@ -147,6 +148,10 @@ if ($_POST['save']) {
}
}
+ 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