diff --git a/usr/local/www/firewall_virtual_ip.php b/usr/local/www/firewall_virtual_ip.php index 55f6383621..2a17a9e5fa 100755 --- a/usr/local/www/firewall_virtual_ip.php +++ b/usr/local/www/firewall_virtual_ip.php @@ -240,6 +240,7 @@ include("head.inc"); $carplist = get_configured_carp_interface_list(); foreach ($carplist as $cif => $carpip) $interfaces[$cif] = $carpip." (".get_vip_descr($carpip).")"; + $interfaces['lo0'] = "Localhost"; ?> "" or $vipent['range'] <> "" or diff --git a/usr/local/www/firewall_virtual_ip_edit.php b/usr/local/www/firewall_virtual_ip_edit.php index c906b4c9f5..0dc6cebbca 100755 --- a/usr/local/www/firewall_virtual_ip_edit.php +++ b/usr/local/www/firewall_virtual_ip_edit.php @@ -178,6 +178,8 @@ if ($_POST) { $input_errors[] = sprintf(gettext("Sorry, we could not locate an interface with a matching subnet for %s. Please add an IP alias in this subnet on this interface."),$cannot_find); } + if ($_POST['interface'] == "lo0") + $input_errors[] = gettext("For this type of vip localhost is not allowed."); if (strstr($_POST['interface'], "_vip")) $input_errors[] = gettext("For this type of vip a carp parent is not allowed."); break; @@ -199,6 +201,8 @@ if ($_POST) { } break; default: + if ($_POST['interface'] == "lo0") + $input_errors[] = gettext("For this type of vip localhost is not allowed."); if (strstr($_POST['interface'], "_vip")) $input_errors[] = gettext("For this type of VIP, a CARP parent is not allowed."); break; @@ -381,11 +385,12 @@ function typesel_change() {