diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2006-06-15 16:59:31 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2006-06-15 16:59:31 +0000 |
commit | 2782a8a71bf825fbcca9418ad6e1a91ea42afc7e (patch) | |
tree | 8b28c8629456cfd071edd7d81e9fbb3fbd211917 /usr/local | |
parent | 183eb39fcb12f81c2b17de82c762bf2696c4b04f (diff) | |
download | pfsense-2782a8a71bf825fbcca9418ad6e1a91ea42afc7e.zip pfsense-2782a8a71bf825fbcca9418ad6e1a91ea42afc7e.tar.gz |
Correctly remove old monitor ip from routing table
Diffstat (limited to 'usr/local')
-rwxr-xr-x | usr/local/www/load_balancer_pool_edit.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr/local/www/load_balancer_pool_edit.php b/usr/local/www/load_balancer_pool_edit.php index b51d8e9..f95687c 100755 --- a/usr/local/www/load_balancer_pool_edit.php +++ b/usr/local/www/load_balancer_pool_edit.php @@ -105,6 +105,10 @@ if ($_POST) { if($poolent['name'] != "") $changedesc .= " modified '{$poolent['name']}' pool:"; + /* kill off old static route */ + if(is_ipaddr($poolent['monitor'])) + mwexec("route delete {$poolent['monitor']}"); + update_if_changed("type", $poolent['type'], $_POST['type']); update_if_changed("monitorip", $poolent['monitorip'], $_POST['monitorip']); update_if_changed("name", $poolent['name'], $_POST['name']); @@ -113,9 +117,6 @@ if ($_POST) { update_if_changed("servers", $poolent['servers'], $_POST['servers']); update_if_changed("monitor", $poolent['monitor'], $_POST['monitor']); - /* kill off old static route */ - mwexec("route delete {$_POST['monitorip']}"); - if (isset($id) && $a_pool[$id]) { /* modify all virtual servers with this name */ for ($i = 0; isset($config['load_balancer']['virtual_server'][$i]); $i++) { |