summaryrefslogtreecommitdiffstats
path: root/usr/local/www/services_dhcp_edit.php
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2007-03-29 17:35:31 +0000
committerScott Ullrich <sullrich@pfsense.org>2007-03-29 17:35:31 +0000
commita4f15b52b374c804ba5098841293965e8a5c5dc6 (patch)
tree677ffe6ed240175b317782c5a545a6925c91dadc /usr/local/www/services_dhcp_edit.php
parent6c893f02f0a42ef16ccc365b5ec1def9d9e3efab (diff)
downloadpfsense-a4f15b52b374c804ba5098841293965e8a5c5dc6.zip
pfsense-a4f15b52b374c804ba5098841293965e8a5c5dc6.tar.gz
MFC 17270
Fix hostname check when hostname field is blank
Diffstat (limited to 'usr/local/www/services_dhcp_edit.php')
-rwxr-xr-xusr/local/www/services_dhcp_edit.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr/local/www/services_dhcp_edit.php b/usr/local/www/services_dhcp_edit.php
index 238456f..df63e09 100755
--- a/usr/local/www/services_dhcp_edit.php
+++ b/usr/local/www/services_dhcp_edit.php
@@ -91,7 +91,7 @@ if ($_POST) {
if (isset($id) && ($a_maps[$id]) && ($a_maps[$id] === $mapent))
continue;
- if (($mapent['hostname'] == $_POST['hostname']) || ($mapent['mac'] == $_POST['mac']) || ($_POST['ipaddr'] && (ip2long($mapent['ipaddr']) == ip2long($_POST['ipaddr'])))) {
+ if ((($mapent['hostname'] == $_POST['hostname']) && $mapent['hostname']) || ($mapent['mac'] == $_POST['mac']) || ($_POST['ipaddr'] && (ip2long($mapent['ipaddr']) == ip2long($_POST['ipaddr'])))) {
$input_errors[] = "This Hostname, IP or MAC address already exists.";
break;
}
OpenPOWER on IntegriCloud