summaryrefslogtreecommitdiffstats
path: root/usr/local/www/load_balancer_virtual_server_edit.php
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2013-08-15 13:45:09 -0400
committerjim-p <jimp@pfsense.org>2013-08-15 13:46:45 -0400
commit108e868d70ab8d0ff546f93c98d5ccd1110bd295 (patch)
tree3f6e682c524422886ba96df5ec57f5c9a540feff /usr/local/www/load_balancer_virtual_server_edit.php
parentc0fc63d15abd3cff89f4081934d090813c00d8c6 (diff)
downloadpfsense-108e868d70ab8d0ff546f93c98d5ccd1110bd295.zip
pfsense-108e868d70ab8d0ff546f93c98d5ccd1110bd295.tar.gz
When renaming or deleting a virtual server, clean up the old relayd anchor name. Otherwise the rules are still there and valid, and will cause problems as they will override the new VS settings. Also clear out the anchors when stopping relayd or starting fresh that way no old settings could conflict.
Diffstat (limited to 'usr/local/www/load_balancer_virtual_server_edit.php')
-rwxr-xr-xusr/local/www/load_balancer_virtual_server_edit.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/usr/local/www/load_balancer_virtual_server_edit.php b/usr/local/www/load_balancer_virtual_server_edit.php
index 4b68b6e..deda062 100755
--- a/usr/local/www/load_balancer_virtual_server_edit.php
+++ b/usr/local/www/load_balancer_virtual_server_edit.php
@@ -117,9 +117,13 @@ if ($_POST) {
if($_POST['sitedown'] == "")
unset($vsent['sitedown']);
- if (isset($id) && $a_vs[$id])
+ if (isset($id) && $a_vs[$id]) {
+ if ($a_vs[$id]['name'] != $_POST['name']) {
+ /* Because the VS name changed, mark the old name for cleanup. */
+ cleanup_lb_mark_anchor($a_vs[$id]['name']);
+ }
$a_vs[$id] = $vsent;
- else
+ } else
$a_vs[] = $vsent;
if ($changecount > 0) {
OpenPOWER on IntegriCloud