aboutsummaryrefslogtreecommitdiffstats
path: root/config/haproxy-devel
diff options
context:
space:
mode:
authorPiBa-NL <pba_2k3@yahoo.com>2013-09-22 16:04:06 +0200
committerPiBa-NL <pba_2k3@yahoo.com>2013-09-22 16:04:06 +0200
commitad690fce2f63f41eac990d4eb526eecbcaf4f08a (patch)
tree3e2b2665697db52c02d26067aeb12efc20085b59 /config/haproxy-devel
parentd88e8e657a759c8f79fecf3a54d54b8225520b08 (diff)
downloadpfsense-packages-ad690fce2f63f41eac990d4eb526eecbcaf4f08a.tar.gz
pfsense-packages-ad690fce2f63f41eac990d4eb526eecbcaf4f08a.tar.bz2
pfsense-packages-ad690fce2f63f41eac990d4eb526eecbcaf4f08a.zip
HAProxy-devel update frontend name references, for shared frontends.
Diffstat (limited to 'config/haproxy-devel')
-rw-r--r--config/haproxy-devel/haproxy_listeners_edit.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/config/haproxy-devel/haproxy_listeners_edit.php b/config/haproxy-devel/haproxy_listeners_edit.php
index 8f9c2484..dc418614 100644
--- a/config/haproxy-devel/haproxy_listeners_edit.php
+++ b/config/haproxy-devel/haproxy_listeners_edit.php
@@ -229,6 +229,15 @@ if ($_POST) {
if($backend['name'] != "")
$changedesc .= " modified '{$backend['name']}' pool:";
+
+ // update references to this primary frontend
+ if ($backend['name'] != $_POST['name']) {
+ foreach($a_backend as &$frontend) {
+ if ($frontend['primary_frontend'] == $backend['name']) {
+ $frontend['primary_frontend'] = $_POST['name'];
+ }
+ }
+ }
foreach($simplefields as $stat)
update_if_changed($stat, $backend[$stat], $_POST[$stat]);