aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/haproxy/haproxy.inc19
-rwxr-xr-xpkg_config.7.xml2
-rwxr-xr-xpkg_config.8.xml2
3 files changed, 13 insertions, 10 deletions
diff --git a/config/haproxy/haproxy.inc b/config/haproxy/haproxy.inc
index e5aabb38..f3203ab2 100644
--- a/config/haproxy/haproxy.inc
+++ b/config/haproxy/haproxy.inc
@@ -124,25 +124,28 @@ function haproxy_configure() {
foreach ($a_backends as $backend) {
// Define our backend name
- $backend = "listen {$backend['name']}\n";
+ $backendinfo = "listen {$backend['name']}\n";
// Prepare ports for processing by splitting
- $backend['port'] .= ",";
- $ports = split(",", $backend['port']);
-
+ $portss = "{$backend['port']},";
+ $ports = split(",", $portss);
+
+ // Initialize variable
+ $listenip = "";
+
// Process and add bind directives for ports
foreach($ports as $port) {
if($port) {
if($backend['extaddr'] == "any")
- $listenip = "bind\t\t\t0.0.0.0:" . $port . "\n";
+ $listenip .= "\tbind\t\t\t0.0.0.0:{$port}\n";
elseif($backend['extaddr'])
- $listenip = "bind\t\t\t" . $backend['extaddr'] . ":" . $port ."\n";
+ $listenip .= "\tbind\t\t\t{$backend['extaddr']}:{$port}\n";
else
- $listenip = "bind\t\t\t" . get_current_wan_address('wan').":" . $port ."\n";
+ $listenip .= "\tbind\t\t\t" . get_current_wan_address('wan') . ":{$port}\n";
}
}
- fwrite ($fd, "{$backend}");
+ fwrite ($fd, "{$backendinfo}");
fwrite ($fd, "{$listenip}");
fwrite ($fd, "\tmode\t\t\t".$backend['type'] . "\n");
fwrite ($fd, "\tlog\t\t\tglobal\n");
diff --git a/pkg_config.7.xml b/pkg_config.7.xml
index 0b2892e2..290f15df 100755
--- a/pkg_config.7.xml
+++ b/pkg_config.7.xml
@@ -19,7 +19,7 @@
<descr>The Reliable, High Performance TCP/HTTP Load Balancer</descr>
<website>http://haproxy.1wt.eu/</website>
<category>Services</category>
- <version>0.12</version>
+ <version>0.13</version>
<status>BETA</status>
<required_version>1.2.3</required_version>
<config_file>http://www.pfsense.com/packages/config/haproxy/haproxy.xml</config_file>
diff --git a/pkg_config.8.xml b/pkg_config.8.xml
index 5858f10e..ee7c828d 100755
--- a/pkg_config.8.xml
+++ b/pkg_config.8.xml
@@ -19,7 +19,7 @@
<descr>The Reliable, High Performance TCP/HTTP Load Balancer</descr>
<website>http://haproxy.1wt.eu/</website>
<category>Services</category>
- <version>0.12</version>
+ <version>0.13</version>
<status>BETA</status>
<required_version>1.2.3</required_version>
<config_file>http://www.pfsense.com/packages/config/haproxy/haproxy.xml</config_file>