aboutsummaryrefslogtreecommitdiffstats
path: root/config/haproxy-devel/haproxy.inc
diff options
context:
space:
mode:
authorPiBa-NL <pba_2k3@yahoo.com>2013-11-27 23:47:18 +0100
committerPiBa-NL <pba_2k3@yahoo.com>2013-11-28 00:01:53 +0100
commit8884bc0fe5f8b274d9498f600ec5287acbe87694 (patch)
treedecb479eb03aa22635b6b385bb571e046efbc6fc /config/haproxy-devel/haproxy.inc
parentcecde162c97ceb3309b29c98ef1648abcb0379bf (diff)
downloadpfsense-packages-8884bc0fe5f8b274d9498f600ec5287acbe87694.tar.gz
pfsense-packages-8884bc0fe5f8b274d9498f600ec5287acbe87694.tar.bz2
pfsense-packages-8884bc0fe5f8b274d9498f600ec5287acbe87694.zip
haproxy-devel, -made more consistent use of frontend/backend text
-show hints on add/delete/clone buttons -on frontend page show servers in a backend in a hint on the backend -fix html character display in interface box. -small 'config update' to externeladdress field for localhost/any/interfaceaddress to allow for a little easier update to latest version. -trigger 'apply button' after recalculating certificate chain if a reference was changed.
Diffstat (limited to 'config/haproxy-devel/haproxy.inc')
-rw-r--r--config/haproxy-devel/haproxy.inc25
1 files changed, 24 insertions, 1 deletions
diff --git a/config/haproxy-devel/haproxy.inc b/config/haproxy-devel/haproxy.inc
index 4da961de..f768ef01 100644
--- a/config/haproxy-devel/haproxy.inc
+++ b/config/haproxy-devel/haproxy.inc
@@ -281,6 +281,18 @@ EOD;
$bind['httpclose'] = "httpclose";
$writeconfigupdate = true;
}
+ if (!$bind['extaddr']){
+ $bind['extaddr'] = "wan_ipv4";
+ $writeconfigupdate = true;
+ }
+ if ($bind['extaddr'] == "localhost"){
+ $bind['extaddr'] = "localhost_ipv4";
+ $writeconfigupdate = true;
+ }
+ if ($bind['extaddr'] == "any"){
+ $bind['extaddr'] = "any_ipv4";
+ $writeconfigupdate = true;
+ }
}
}
if ($writeconfigupdate)
@@ -721,7 +733,7 @@ function haproxy_writeconf($configfile) {
fwrite ($fd, "\ttimeout client\t\t" . $bind['client_timeout'] . "\n");
- // Combine the rest of the listener configs
+ // Combine the rest of the frontend configs
$default_backend = "";
$i = 0;
foreach ($bind['config'] as $bconfig) {
@@ -1124,6 +1136,17 @@ function get_frontend_acls($frontend) {
return $result;
}
+function get_backend($name) {
+ global $config;
+ $a_backend = &$config['installedpackages']['haproxy']['ha_pools']['item'];
+ foreach($a_backend as $key => $backend)
+ {
+ if ($backend['name'] == $name)
+ return $backend;
+ }
+ return null;
+}
+
function haproxy_escapestring($configurationsting) {
$result = str_replace('\\', '\\\\', $configurationsting);
$result = str_replace(' ', '\\ ', $result);