summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2010-06-14 11:54:23 +0000
committerErmal <eri@pfsense.org>2010-06-14 11:54:23 +0000
commit2b6f65d736003028f8def68b325cc10998dc6fea (patch)
tree63f5a09fe7525e38f4ba64378fc006bf3cf75e2e /usr
parente03b0a03fb52f94e4f2a85baecdcb9ada18ec939 (diff)
downloadpfsense-2b6f65d736003028f8def68b325cc10998dc6fea.zip
pfsense-2b6f65d736003028f8def68b325cc10998dc6fea.tar.gz
Fixes #549. Save a list of all changed vips to reload in a temporary file so when apply is clicked it can process all of them.
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/www/firewall_virtual_ip.php40
-rwxr-xr-xusr/local/www/firewall_virtual_ip_edit.php8
2 files changed, 29 insertions, 19 deletions
diff --git a/usr/local/www/firewall_virtual_ip.php b/usr/local/www/firewall_virtual_ip.php
index 873f422..1d2e634 100755
--- a/usr/local/www/firewall_virtual_ip.php
+++ b/usr/local/www/firewall_virtual_ip.php
@@ -62,24 +62,28 @@ if ($_POST) {
$pconfig = $_POST;
if ($_POST['apply']) {
-
- if ($a_vip[$_POST['id']]) {
- switch ($a_vip[$_POST['id']]['mode']) {
- case "ipalias":
- interface_ipalias_configure($a_vip[$_POST['id']]);
- break;
- case "proxyarp":
- interface_proxyarp_configure();
- break;
- case "carp":
- interface_carp_configure($a_vip[$_POST['id']]);
- break;
- case "carpdev-dhcp":
- interface_carpdev_configure($a_vip[$_POST['id']]);
- break;
- default:
- break;
- }
+ $toapplylist = array();
+ 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) {
+ if ($a_vip[$vid]) {
+ switch ($a_vip[$vid]['mode']) {
+ case "ipalias":
+ interface_ipalias_configure($a_vip[$vid]);
+ break;
+ case "proxyarp":
+ interface_proxyarp_configure();
+ break;
+ case "carp":
+ interface_carp_configure($a_vip[$vid]);
+ break;
+ case "carpdev-dhcp":
+ interface_carpdev_configure($a_vip[$vid]);
+ break;
+ default:
+ break;
+ }
+ }
}
$retval = 0;
$retval |= filter_configure();
diff --git a/usr/local/www/firewall_virtual_ip_edit.php b/usr/local/www/firewall_virtual_ip_edit.php
index d8a44db..8970e33 100755
--- a/usr/local/www/firewall_virtual_ip_edit.php
+++ b/usr/local/www/firewall_virtual_ip_edit.php
@@ -218,7 +218,13 @@ if ($_POST) {
write_config();
if (!isset($id))
$id = count($a_vip) - 1;
- header("Location: firewall_virtual_ip.php?changes=mods&id={$id}");
+ if (file_exists("{$g['tmp_path']}/firewall_virtual_ip.apply"))
+ $toapplylist = unserialize(file_get_contents("{$g['tmp_path']}/firewall_virtual_ip.apply"));
+ else
+ $toapplylist = array();
+ $toapplylist[] = $id;
+ file_put_contents("{$g['tmp_path']}/firewall_virtual_ip.apply", serialize($toapplylist));
+ header("Location: firewall_virtual_ip.php");
exit;
}
}
OpenPOWER on IntegriCloud