summaryrefslogtreecommitdiffstats
path: root/usr/local/www
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2007-05-08 18:58:32 +0000
committerScott Ullrich <sullrich@pfsense.org>2007-05-08 18:58:32 +0000
commit0baa37c501e15aa104298c302fa43e45395edcab (patch)
tree86024a211b1fe95dcfc18ba23289c9503cf4a80c /usr/local/www
parent91adc5c16f8293a9f4680e79e4d0aa2d8903eee1 (diff)
downloadpfsense-0baa37c501e15aa104298c302fa43e45395edcab.zip
pfsense-0baa37c501e15aa104298c302fa43e45395edcab.tar.gz
When Enable Static ARP entries is enabled, do not allow entries that lack an ip address from being added. Currently we do not have any type of dhcp server hooks to automatically add the arp address to the arp table to make this work otherwise.
Diffstat (limited to 'usr/local/www')
-rwxr-xr-xusr/local/www/services_dhcp_edit.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/usr/local/www/services_dhcp_edit.php b/usr/local/www/services_dhcp_edit.php
index df63e09..370b9b6 100755
--- a/usr/local/www/services_dhcp_edit.php
+++ b/usr/local/www/services_dhcp_edit.php
@@ -43,6 +43,9 @@ if (!$if) {
if (!is_array($config['dhcpd'][$if]['staticmap'])) {
$config['dhcpd'][$if]['staticmap'] = array();
}
+
+$static_map_enabled=isset($config['dhcpd'][$if]['staticarp']);
+
staticmaps_sort($if);
$a_maps = &$config['dhcpd'][$if]['staticmap'];
$ifcfg = &$config['interfaces'][$if];
@@ -85,7 +88,10 @@ if ($_POST) {
if (($_POST['mac'] && !is_macaddr($_POST['mac']))) {
$input_errors[] = "A valid MAC address must be specified.";
}
-
+ if($static_map_enabled && !$_POST['ipaddr']) {
+ $input_errors[] = "Static map is enabled. You must specify an IP address.";
+ }
+
/* check for overlaps */
foreach ($a_maps as $mapent) {
if (isset($id) && ($a_maps[$id]) && ($a_maps[$id] === $mapent))
OpenPOWER on IntegriCloud