From 12c887006320a3d01a3f761eca2dfc8f64c41fa2 Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Tue, 5 Aug 2014 12:43:34 -0300 Subject: Allow to add ipalias vip to lo0, it should fix #3773 --- usr/local/www/firewall_virtual_ip_edit.php | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'usr/local/www/firewall_virtual_ip_edit.php') diff --git a/usr/local/www/firewall_virtual_ip_edit.php b/usr/local/www/firewall_virtual_ip_edit.php index 2a1e120..bf48e12 100644 --- a/usr/local/www/firewall_virtual_ip_edit.php +++ b/usr/local/www/firewall_virtual_ip_edit.php @@ -142,8 +142,7 @@ if ($_POST) { /* make sure new ip is within the subnet of a valid ip * on one of our interfaces (wan, lan optX) */ - switch ($_POST['mode']) { - case "carp": + if ($_POST['mode'] == 'carp') { /* verify against reusage of vhids */ $idtracker = 0; foreach($config['virtualip']['vip'] as $vip) { @@ -171,12 +170,8 @@ if ($_POST) { if ($_POST['interface'] == "lo0") $input_errors[] = gettext("For this type of vip localhost is not allowed."); - break; - default: - if ($_POST['interface'] == "lo0") - $input_errors[] = gettext("For this type of vip localhost is not allowed."); - break; - } + } else if ($_POST['mode'] != 'ipalias' && $_POST['interface'] == "lo0") + $input_errors[] = gettext("For this type of vip localhost is not allowed."); if (!$input_errors) { $vipent = array(); -- cgit v1.1