summaryrefslogtreecommitdiffstats
path: root/usr/local/www/services_dhcp_edit.php
diff options
context:
space:
mode:
authorIndividual IT Services <ict.projects@nepal.inf.org>2013-08-13 04:14:36 -0700
committerIndividual IT Services <ict.projects@nepal.inf.org>2013-08-13 04:14:36 -0700
commitce13cc5f8f661f4ef0d24e237a83d4caccea6a11 (patch)
tree3db7f89f5bc10bcfb35274cd2f3c2b7fecd72adb /usr/local/www/services_dhcp_edit.php
parent61ef13853f8bd1c02e323b36973b581348ffb805 (diff)
downloadpfsense-ce13cc5f8f661f4ef0d24e237a83d4caccea6a11.zip
pfsense-ce13cc5f8f661f4ef0d24e237a83d4caccea6a11.tar.gz
Fix check for existing IP Address in DHCP mapping
Even the Error message says: "This Hostname, IP or MAC address already exists." the IP Address was not checked if it already was given to a client as static mapped
Diffstat (limited to 'usr/local/www/services_dhcp_edit.php')
-rwxr-xr-xusr/local/www/services_dhcp_edit.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr/local/www/services_dhcp_edit.php b/usr/local/www/services_dhcp_edit.php
index 281d754..5428747 100755
--- a/usr/local/www/services_dhcp_edit.php
+++ b/usr/local/www/services_dhcp_edit.php
@@ -179,7 +179,8 @@ if ($_POST) {
if (isset($id) && ($a_maps[$id]) && ($a_maps[$id] === $mapent))
continue;
- if ((($mapent['hostname'] == $_POST['hostname']) && $mapent['hostname']) || (($mapent['mac'] == $_POST['mac']) && $mapent['mac']) || (($mapent['cid'] == $_POST['cid']) && $mapent['cid'])) {
+ if ((($mapent['hostname'] == $_POST['hostname']) && $mapent['hostname']) || (($mapent['mac'] == $_POST['mac']) && $mapent['mac']) || (($mapent['ipaddr'] == $_POST['ipaddr']) && $mapent['ipaddr'] ) || (($mapent['cid'] == $_POST['cid']) && $mapent['cid'])) {
+
$input_errors[] = gettext("This Hostname, IP, MAC address or Client identifier already exists.");
break;
}
OpenPOWER on IntegriCloud