summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2010-08-03 09:37:50 -0400
committerjim-p <jimp@pfsense.org>2010-08-03 09:37:50 -0400
commit073a2697dd86a8dece8dafa28b71084a547ba31e (patch)
treeeb3e8256f1bd7685a9b9294f5d0f902fc4b28753 /usr
parent01292dc2e49bb49ac37d48d06d0a8a113f1f3be6 (diff)
downloadpfsense-073a2697dd86a8dece8dafa28b71084a547ba31e.zip
pfsense-073a2697dd86a8dece8dafa28b71084a547ba31e.tar.gz
Prevent enabling static ARP if there are static map entries that lack IP addresses.
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/www/services_dhcp.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/usr/local/www/services_dhcp.php b/usr/local/www/services_dhcp.php
index 6747d3c..9f4d9d6 100755
--- a/usr/local/www/services_dhcp.php
+++ b/usr/local/www/services_dhcp.php
@@ -252,6 +252,13 @@ if ($_POST) {
}
}
+ $noip = false;
+ foreach ($a_maps as $map)
+ if (empty($map['ipaddr']))
+ $noip = true;
+ if ($_POST['staticarp'] && $noip)
+ $input_errors[] = "Cannot enable static ARP when you have static map entries without IP addresses. Ensure all static maps have IP addresses and try again.";
+
if (!$input_errors) {
/* make sure the range lies within the current subnet */
$subnet_start = ip2ulong(long2ip32(ip2long($ifcfgip) & gen_subnet_mask_long($ifcfgsn)));
OpenPOWER on IntegriCloud