From 6715c2a295ecdee663e5d185284c72dff815518e Mon Sep 17 00:00:00 2001 From: Seth Mos Date: Thu, 10 Feb 2011 11:18:28 +0100 Subject: [PATCH] Fix the IP address check to allow for interfaces that just have a IPv6 address but no IPv4 --- usr/local/www/firewall_virtual_ip_edit.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr/local/www/firewall_virtual_ip_edit.php b/usr/local/www/firewall_virtual_ip_edit.php index 3dbb31c8a0..e5581ca312 100755 --- a/usr/local/www/firewall_virtual_ip_edit.php +++ b/usr/local/www/firewall_virtual_ip_edit.php @@ -112,8 +112,8 @@ if ($_POST) { $natiflist = get_configured_interface_with_descr(); foreach ($natiflist as $natif => $natdescr) { - if ($_POST['interface'] == $natif && empty($config['interfaces'][$natif]['ipaddr'])) - $input_errors[] = gettext("The interface chosen for the VIP has no ip configured so it cannot be used as a parent for the VIP."); + if ($_POST['interface'] == $natif && (empty($config['interfaces'][$natif]['ipaddr']) && empty($config['interfaces'][$natif]['ipaddrv6']))) + $input_errors[] = gettext("The interface chosen for the VIP has no IPv4 or IPv6 address configured so it cannot be used as a parent for the VIP."); if ($_POST['subnet'] == get_interface_ip($natif)) $input_errors[] = sprintf(gettext("The %s IP address may not be used in a virtual entry."),$natdescr); }