diff options
author | Individual IT Services <ict.projects@nepal.inf.org> | 2013-08-13 04:14:36 -0700 |
---|---|---|
committer | Individual IT Services <ict.projects@nepal.inf.org> | 2013-08-13 04:14:36 -0700 |
commit | ce13cc5f8f661f4ef0d24e237a83d4caccea6a11 (patch) | |
tree | 3db7f89f5bc10bcfb35274cd2f3c2b7fecd72adb /usr/local/www/services_dhcp_edit.php | |
parent | 61ef13853f8bd1c02e323b36973b581348ffb805 (diff) | |
download | pfsense-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-x | usr/local/www/services_dhcp_edit.php | 3 |
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; } |