From 2452cc37fb1b735d88b0791ec062c378a2d68f27 Mon Sep 17 00:00:00 2001 From: Darren Embry Date: Wed, 21 Mar 2012 19:19:14 -0400 Subject: fix: Input validation problem with VIPs and "none" type interfaces http://redmine.pfsense.org/issues/2291 --- usr/local/www/interfaces.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/usr/local/www/interfaces.php b/usr/local/www/interfaces.php index 150a2f4..837ccda 100755 --- a/usr/local/www/interfaces.php +++ b/usr/local/www/interfaces.php @@ -435,8 +435,8 @@ if ($_POST['apply']) { case "none": if(is_array($config['virtualip']['vip'])) { foreach ($config['virtualip']['vip'] as $vip) { - if ($vip['interface'] == $if) - $input_errors[] = gettext("This interface is referenced by VIPs please delete those before setting the interface to 'none' configuration."); + if (is_ipaddrv4($vip['subnet']) && $vip['interface'] == $if) + $input_errors[] = gettext("This interface is referenced by IPv4 VIPs. Please delete those before setting the interface to 'none' configuration."); } } case "dhcp": @@ -488,8 +488,8 @@ if ($_POST['apply']) { case "none": if(is_array($config['virtualip']['vip'])) { foreach ($config['virtualip']['vip'] as $vip) { - if ($vip['interface'] == $if) - $input_errors[] = gettext("This interface is referenced by VIPs please delete those before setting the interface to 'none' configuration."); + if (is_ipaddrv6($vip['subnet']) && $vip['interface'] == $if) + $input_errors[] = gettext("This interface is referenced by IPv6 VIPs. Please delete those before setting the interface to 'none' configuration."); } } case "dhcp6": -- cgit v1.1