diff options
author | Ermal Luçi <eri@pfsense.org> | 2009-10-01 15:18:17 +0000 |
---|---|---|
committer | Ermal Luçi <eri@pfsense.org> | 2009-10-01 15:19:42 +0000 |
commit | abcb2bed927c18f29b12972f023b253c703132d1 (patch) | |
tree | e06b5f0da200a6694b2d3a5ba79907fb6de06b46 /usr/local/www/firewall_virtual_ip.php | |
parent | 6b0c587976d5941bce0b7e569a519f7e7fcbc62a (diff) | |
download | pfsense-abcb2bed927c18f29b12972f023b253c703132d1.zip pfsense-abcb2bed927c18f29b12972f023b253c703132d1.tar.gz |
* Convert carp/vips code to behave the same as other interfaces.
* Make optimizations around it.
* Make sure when we reload teh underlying interface we reload carp too.
* Some fixes around the code.
Reviewed-by: scott@ and billm@
Diffstat (limited to 'usr/local/www/firewall_virtual_ip.php')
-rwxr-xr-x | usr/local/www/firewall_virtual_ip.php | 34 |
1 files changed, 25 insertions, 9 deletions
diff --git a/usr/local/www/firewall_virtual_ip.php b/usr/local/www/firewall_virtual_ip.php index e69ab4a..dd4dd2c 100755 --- a/usr/local/www/firewall_virtual_ip.php +++ b/usr/local/www/firewall_virtual_ip.php @@ -59,17 +59,29 @@ 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": + services_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; + } + } $retval = 0; - $retval = services_proxyarp_configure(); - /* Bring up any configured CARP interfaces */ - reset_carp(); $retval |= filter_configure(); - interfaces_ipalias_configure(); - /* reset carp states */ - reset_carp(); - interfaces_carp_configure(); - $savemsg = get_std_save_message($retval); + clear_subsystem_dirty('vip'); } } @@ -98,7 +110,8 @@ if ($_GET['act'] == "del") { exit; } } -} +} else if ($_GET['changes'] == "mods") + $id = $_GET['id']; $pgtitle = array("Firewall","Virtual IP Addresses"); include("head.inc"); @@ -129,6 +142,9 @@ include("head.inc"); ?> </td></tr> <tr> + <td><input type="hidden" id="id" name="id" value="<? echo $id; ?>"></td> + </tr> + <tr> <td> <div id="mainarea"> <table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0"> |