aboutsummaryrefslogtreecommitdiffstats
path: root/config/haproxy/haproxy.inc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2009-11-16 21:58:44 -0500
committerScott Ullrich <sullrich@pfsense.org>2009-11-16 21:58:54 -0500
commit6751851c905c76e48186471a57e199031100a154 (patch)
tree4cb1e69f5c765c37fe7b568ae5e0a77f72d8a9ae /config/haproxy/haproxy.inc
parent042ce5512ec931a0a5cc92e9ca0ce38dca3631c7 (diff)
downloadpfsense-packages-6751851c905c76e48186471a57e199031100a154.tar.gz
pfsense-packages-6751851c905c76e48186471a57e199031100a154.tar.bz2
pfsense-packages-6751851c905c76e48186471a57e199031100a154.zip
Unbreak External address feature
Diffstat (limited to 'config/haproxy/haproxy.inc')
-rw-r--r--config/haproxy/haproxy.inc9
1 files changed, 5 insertions, 4 deletions
diff --git a/config/haproxy/haproxy.inc b/config/haproxy/haproxy.inc
index 527546ff..9fdd7b49 100644
--- a/config/haproxy/haproxy.inc
+++ b/config/haproxy/haproxy.inc
@@ -121,12 +121,13 @@ function haproxy_configure() {
if(is_array($a_backends)) {
foreach ($a_backends as $backend) {
- if($backend['extaddr']=='any')
+
+ if($backend['extaddr'] == "any")
$listenip = "listen {$backend['name']}\t\t\t0.0.0.0:".$backend['port']."\n";
- else if($frontend['extaddr']=='')
- $listenip = "listen {$backend['name']}\t\t\t" . get_current_wan_address('wan').":" . $backend['port']."\n";
+ if($backend['extaddr'])
+ $listenip = "listen {$backend['name']}\t\t\t" . $backend['extaddr'] . ":" . $backend['port']."\n";
else
- $listenip = "listen {$backend['name']}\t\t\t" . $backend['extaddr'] . ":" . $backend['port']."\n";
+ $listenip = "listen {$backend['name']}\t\t\t" . get_current_wan_address('wan').":" . $backend['port']."\n";
fwrite ($fd, "{$listenip}");
fwrite ($fd, "\tmode\t\t\t".$backend['type'] . "\n");