diff options
author | jim-p <jimp@pfsense.org> | 2011-06-11 20:51:05 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2011-06-11 20:51:05 -0400 |
commit | 424be584c34531d52ac0da8a5e954847e158c6cf (patch) | |
tree | 4a8ad9008b22e7f18f7c76579f85d071815e52e2 /usr/local/www/services_dnsmasq_edit.php | |
parent | 06da79f9a5a60d30533796d36f700b708f1a3838 (diff) | |
download | pfsense-424be584c34531d52ac0da8a5e954847e158c6cf.zip pfsense-424be584c34531d52ac0da8a5e954847e158c6cf.tar.gz |
Allow someone to add a host DNS override twice, so long as the IP type isn't the same. Lets you add a host override for both IPv4 and IPv6 for the same hostname.
Diffstat (limited to 'usr/local/www/services_dnsmasq_edit.php')
-rwxr-xr-x | usr/local/www/services_dnsmasq_edit.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr/local/www/services_dnsmasq_edit.php b/usr/local/www/services_dnsmasq_edit.php index 3638054..9aea153 100755 --- a/usr/local/www/services_dnsmasq_edit.php +++ b/usr/local/www/services_dnsmasq_edit.php @@ -95,7 +95,8 @@ if ($_POST) { if (isset($id) && ($a_hosts[$id]) && ($a_hosts[$id] === $hostent)) continue; - if (($hostent['host'] == $_POST['host']) && ($hostent['domain'] == $_POST['domain'])) { + 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; } |