aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorthompsa <andy@fud.org.nz>2010-02-08 07:54:43 +1300
committerthompsa <andy@fud.org.nz>2010-02-08 07:55:35 +1300
commit8c30271ae4314c990019b96eb2aed3dfdbbee43a (patch)
tree58a61c10b0b9f2f8874d1d0cde84af054cdc606a
parent013161627742bd3083e8f088fbb5de676d5477a9 (diff)
downloadpfsense-packages-8c30271ae4314c990019b96eb2aed3dfdbbee43a.tar.gz
pfsense-packages-8c30271ae4314c990019b96eb2aed3dfdbbee43a.tar.bz2
pfsense-packages-8c30271ae4314c990019b96eb2aed3dfdbbee43a.zip
Save the default server port which is different to the external port
number.
-rw-r--r--config/haproxy-dev/haproxy.inc2
-rwxr-xr-xconfig/haproxy-dev/haproxy_listeners_edit.php2
2 files changed, 3 insertions, 1 deletions
diff --git a/config/haproxy-dev/haproxy.inc b/config/haproxy-dev/haproxy.inc
index d6665f38..0a8f60fc 100644
--- a/config/haproxy-dev/haproxy.inc
+++ b/config/haproxy-dev/haproxy.inc
@@ -265,7 +265,7 @@ function haproxy_configure() {
$a_servers = &$pool['ha_servers']['item'];
foreach($a_servers as $be) {
if(!$be['port'])
- $be['port'] = $backend['port'];
+ $be['port'] = $backend['svrport'];
if (!$be['name'])
$be['name'] = $be['address'];
fwrite ($fd, "\tserver\t\t\t" . $be['name'] . " " . $be['address'].":" . $be['port'] . " $cookie " . " $checkinter weight " . $be['weight'] . "{$advanced_txt}\n");
diff --git a/config/haproxy-dev/haproxy_listeners_edit.php b/config/haproxy-dev/haproxy_listeners_edit.php
index 67218022..3beff881 100755
--- a/config/haproxy-dev/haproxy_listeners_edit.php
+++ b/config/haproxy-dev/haproxy_listeners_edit.php
@@ -84,6 +84,7 @@ if (isset($id) && $a_backend[$id]) {
$pconfig['max_connections'] = $a_backend[$id]['max_connections'];
$pconfig['client_timeout'] = $a_backend[$id]['client_timeout'];
$pconfig['port'] = $a_backend[$id]['port'];
+ $pconfig['svrport'] = $a_backend[$id]['svrport'];
$pconfig['a_acl']=&$a_backend[$id]['ha_acls']['item'];
$pconfig['advanced'] = base64_decode($a_backend[$id]['advanced']);
@@ -209,6 +210,7 @@ if ($_POST) {
update_if_changed("stats_realm", $backend['stats_realm'], $_POST['stats_realm']);
update_if_changed("type", $backend['type'], $_POST['type']);
update_if_changed("port", $backend['port'], $_POST['port']);
+ update_if_changed("svrport", $backend['svrport'], $_POST['svrport']);
update_if_changed("extaddr", $backend['extaddr'], $_POST['extaddr']);
update_if_changed("pool", $backend['pool'], $_POST['pool']);
update_if_changed("max_connections", $backend['max_connections'], $_POST['max_connections']);