diff options
Diffstat (limited to 'usr/local')
-rw-r--r-- | usr/local/www/firewall_virtual_ip_edit.php | 11 |
1 files changed, 3 insertions, 8 deletions
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(); |