diff options
Diffstat (limited to 'src/usr/local/www/services_dnsmasq_edit.php')
-rw-r--r-- | src/usr/local/www/services_dnsmasq_edit.php | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/usr/local/www/services_dnsmasq_edit.php b/src/usr/local/www/services_dnsmasq_edit.php index b476052..a11c259 100644 --- a/src/usr/local/www/services_dnsmasq_edit.php +++ b/src/usr/local/www/services_dnsmasq_edit.php @@ -131,11 +131,15 @@ if ($_POST['save']) { } if (($hostent['host'] == $_POST['host']) && - ($hostent['domain'] == $_POST['domain']) && - ((is_ipaddrv4($hostent['ip']) && is_ipaddrv4($_POST['ip'])) || - (is_ipaddrv6($hostent['ip']) && is_ipaddrv6($_POST['ip'])))) { - $input_errors[] = gettext("This host/domain already exists."); - break; + ($hostent['domain'] == $_POST['domain'])) { + if (is_ipaddrv4($hostent['ip']) && is_ipaddrv4($_POST['ip'])) { + $input_errors[] = gettext("This host/domain override combination already exists with an IPv4 address."); + break; + } + if (is_ipaddrv6($hostent['ip']) && is_ipaddrv6($_POST['ip'])) { + $input_errors[] = gettext("This host/domain override combination already exists with an IPv6 address."); + break; + } } } @@ -228,7 +232,7 @@ if (isset($id) && $a_hosts[$id]) { 'id', null, 'hidden', - $pconfig['id'] + $id )); } |