summaryrefslogtreecommitdiffstats
path: root/usr/local/www/services_dhcp_relay.php
diff options
context:
space:
mode:
authorChris Buechler <cmb@pfsense.org>2007-11-04 22:03:23 +0000
committerChris Buechler <cmb@pfsense.org>2007-11-04 22:03:23 +0000
commit3d7b7757d1037e85e32a63eecdb3b31bef233491 (patch)
tree9acc471caf495445d4164796f0eba5b952c53228 /usr/local/www/services_dhcp_relay.php
parent48c6ab80c449620ff937e0dc4066a9fef1af4ab6 (diff)
downloadpfsense-3d7b7757d1037e85e32a63eecdb3b31bef233491.zip
pfsense-3d7b7757d1037e85e32a63eecdb3b31bef233491.tar.gz
Do not allow DHCP server to be enabled when DHCP relay is enabled, and vice versa
Ticket #1488
Diffstat (limited to 'usr/local/www/services_dhcp_relay.php')
-rwxr-xr-xusr/local/www/services_dhcp_relay.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr/local/www/services_dhcp_relay.php b/usr/local/www/services_dhcp_relay.php
index eba5d39..e18d8bb 100755
--- a/usr/local/www/services_dhcp_relay.php
+++ b/usr/local/www/services_dhcp_relay.php
@@ -88,8 +88,9 @@ $ifcfg = $config['interfaces'][$if];
* the two are not compatible with each other.
*/
$dhcpd_enabled = false;
-foreach($config['dhcpd'] as $dhcp)
- if($dhcp['enable']) $dhcpd_enabled = true;
+foreach($config['dhcpd'] as $dhcp) {
+ if(isset($dhcp['enable'])) $dhcpd_enabled = true;
+}
if ($_POST) {
@@ -177,10 +178,9 @@ function enable_change(enable_over) {
<form action="services_dhcp_relay.php" method="post" name="iform" id="iform">
<?php if ($input_errors) print_input_errors($input_errors); ?>
<?php if ($savemsg) print_info_box($savemsg); ?>
-
<?php
if ($dhcpd_enabled) {
- echo "DHCP Server is currently enabled. Cannot display dhcp-relay service while DHCP Server is enabled on any interface.";
+ echo "DHCP Server is currently enabled. Cannot enable the DHCP Relay service while the DHCP Server is enabled on any interface.";
include("fend.inc");
echo "</body>";
echo "</html>";
OpenPOWER on IntegriCloud