From 1c4c5ed2dd5564d225cd1e8d272dad42df3b201e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ermal=20LU=C3=87I?= Date: Wed, 11 Feb 2015 20:34:47 +0100 Subject: [PATCH] Remove dead code and unset vars so next time the code works properly avoiding cache issues. --- usr/local/www/firewall_virtual_ip_edit.php | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/usr/local/www/firewall_virtual_ip_edit.php b/usr/local/www/firewall_virtual_ip_edit.php index af28d9d3b4..56374c2b7e 100644 --- a/usr/local/www/firewall_virtual_ip_edit.php +++ b/usr/local/www/firewall_virtual_ip_edit.php @@ -182,16 +182,6 @@ if ($_POST) { if (empty($_POST['password'])) $input_errors[] = gettext("You must specify a CARP password that is shared between the two VHID members."); - if (is_ipaddrv4($_POST['subnet'])) { - $parent_ip = get_interface_ip($_POST['interface']); - $parent_sn = get_interface_subnet($_POST['interface']); - $subnet = gen_subnet($parent_ip, $parent_sn); - } else if (is_ipaddrv6($_POST['subnet'])) { - $parent_ip = get_interface_ipv6($_POST['interface']); - $parent_sn = get_interface_subnetv6($_POST['interface']); - $subnet = gen_subnetv6($parent_ip, $parent_sn); - } - if ($_POST['interface'] == 'lo0') $input_errors[] = gettext("For this type of vip localhost is not allowed."); else if (strpos($_POST['interface'], '_vip')) @@ -213,6 +203,7 @@ if ($_POST) { $cannot_find = $_POST['subnet'] . "/" . $_POST['subnet_bits'] ; $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); } + unset($parent_ip, $parent_sn, $subnet); } break; default: