diff options
author | Ermal <eri@pfsense.org> | 2010-09-01 16:09:03 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2010-09-01 16:09:03 +0000 |
commit | 680714775fb3485cd1613815cbcf097911bfbf6c (patch) | |
tree | 4ca0b91b5bd0befcb4f5ee3b9057f4eeb1801641 | |
parent | e847108459441367a88a6e8185165f2e33690d67 (diff) | |
download | pfsense-680714775fb3485cd1613815cbcf097911bfbf6c.zip pfsense-680714775fb3485cd1613815cbcf097911bfbf6c.tar.gz |
Just take action when there is a file otherwise just call filter_reload.
-rwxr-xr-x | usr/local/www/firewall_virtual_ip.php | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/usr/local/www/firewall_virtual_ip.php b/usr/local/www/firewall_virtual_ip.php index ba67914..c3607ec 100755 --- a/usr/local/www/firewall_virtual_ip.php +++ b/usr/local/www/firewall_virtual_ip.php @@ -62,32 +62,32 @@ if ($_POST) { $pconfig = $_POST; if ($_POST['apply']) { - $toapplylist = array(); - if (file_exists("{$g['tmp_path']}/.firewall_virtual_ip.apply")) + if (file_exists("{$g['tmp_path']}/.firewall_virtual_ip.apply")) { $toapplylist = unserialize(file_get_contents("{$g['tmp_path']}/.firewall_virtual_ip.apply")); - foreach ($toapplylist as $vid => $ovip) { - if (!empty($ovip)) - interface_vip_bring_down($ovip); - if ($a_vip[$vid]) { - switch ($a_vip[$vid]['mode']) { - case "ipalias": - interface_ipalias_configure($a_vip[$vid]); - break; - case "proxyarp": - interface_proxyarp_configure($a_vip[$vid]['interface']); - break; - case "carp": - interface_carp_configure($a_vip[$vid]); - break; - case "carpdev-dhcp": - interface_carpdev_configure($a_vip[$vid]); - break; - default: - break; - } - } - } - @unlink("{$g['tmp_path']}/.firewall_virtual_ip.apply"); + foreach ($toapplylist as $vid => $ovip) { + if (!empty($ovip)) + interface_vip_bring_down($ovip); + if ($a_vip[$vid]) { + switch ($a_vip[$vid]['mode']) { + case "ipalias": + interface_ipalias_configure($a_vip[$vid]); + break; + case "proxyarp": + interface_proxyarp_configure($a_vip[$vid]['interface']); + break; + case "carp": + interface_carp_configure($a_vip[$vid]); + break; + case "carpdev-dhcp": + interface_carpdev_configure($a_vip[$vid]); + break; + default: + break; + } + } + } + @unlink("{$g['tmp_path']}/.firewall_virtual_ip.apply"); + } $retval = 0; $retval |= filter_configure(); $savemsg = get_std_save_message($retval); |