aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2014-12-21 20:10:30 -0500
committerjim-p <jimp@pfsense.org>2014-12-21 20:10:30 -0500
commit30967fa4bc6cbce48e25829ad133611b65f30f8a (patch)
treec9fab91fbf3caddd27d750c9281ed2739acdb5cd
parent9575f87529d7c5f63c9454b84e27a474d6283eac (diff)
parentddb8836b32c9e2baccfe4573941224b126cf50cb (diff)
downloadpfsense-packages-30967fa4bc6cbce48e25829ad133611b65f30f8a.tar.gz
pfsense-packages-30967fa4bc6cbce48e25829ad133611b65f30f8a.tar.bz2
pfsense-packages-30967fa4bc6cbce48e25829ad133611b65f30f8a.zip
Merge pull request #756 from PiBa-NL/haproxy_multi_bind_fix
-rw-r--r--config/haproxy-devel/haproxy.inc15
-rw-r--r--pkg_config.10.xml2
-rw-r--r--pkg_config.8.xml2
-rw-r--r--pkg_config.8.xml.amd642
4 files changed, 14 insertions, 7 deletions
diff --git a/config/haproxy-devel/haproxy.inc b/config/haproxy-devel/haproxy.inc
index a596b241..fd086cfc 100644
--- a/config/haproxy-devel/haproxy.inc
+++ b/config/haproxy-devel/haproxy.inc
@@ -634,7 +634,6 @@ function write_backend($configpath, $fd, $name, $pool, $frontend) {
$a_servers = &$pool['ha_servers']['item'];
$frontendtype = $frontend['type'];
- $frontend_ip = haproxy_interface_ip($frontend['extaddr']);
fwrite ($fd, "backend " . $name . "\n");
// https is an alias for tcp for clarity purposes
@@ -785,11 +784,19 @@ function write_backend($configpath, $fd, $name, $pool, $frontend) {
$pool['retries'] = 3;
fwrite ($fd, "\tretries\t\t\t" . $pool['retries'] . "\n");
+ $uses_ipv6 = false;
+ $ips = get_frontend_ipport($frontend);
+ foreach($ips as $ip){
+ $uses_ipv6 = is_ipaddrv6($ip['addr']);
+ if ($uses_ipv6)
+ break;
+ }
+
if ($pool['transparent_clientip']) {
- if (is_ipaddrv4($frontend_ip))
- fwrite ($fd, "\tsource 0.0.0.0 usesrc clientip\n");
- else
+ if ($uses_ipv6)
fwrite ($fd, "\tsource ipv6@ usesrc clientip\n");
+ else
+ fwrite ($fd, "\tsource 0.0.0.0 usesrc clientip\n");
}
$uri = $pool['monitor_uri'];
diff --git a/pkg_config.10.xml b/pkg_config.10.xml
index 4f2e7c5c..3436cf66 100644
--- a/pkg_config.10.xml
+++ b/pkg_config.10.xml
@@ -152,7 +152,7 @@
Supports ACLs for smart backend switching.]]></descr>
<website>http://haproxy.1wt.eu/</website>
<category>Services</category>
- <version>1.5.9 pkg v 0.12</version>
+ <version>1.5.9 pkg v 0.13</version>
<status>Release</status>
<required_version>2.2</required_version>
<config_file>https://packages.pfsense.org/packages/config/haproxy-devel/haproxy.xml</config_file>
diff --git a/pkg_config.8.xml b/pkg_config.8.xml
index cbee7fd8..f5ab5766 100644
--- a/pkg_config.8.xml
+++ b/pkg_config.8.xml
@@ -166,7 +166,7 @@
Supports ACLs for smart backend switching.]]></descr>
<website>http://haproxy.1wt.eu/</website>
<category>Services</category>
- <version>1.5.3 pkg v 0.12</version>
+ <version>1.5.3 pkg v 0.13</version>
<status>Release</status>
<required_version>2.1</required_version>
<config_file>https://packages.pfsense.org/packages/config/haproxy-devel/haproxy.xml</config_file>
diff --git a/pkg_config.8.xml.amd64 b/pkg_config.8.xml.amd64
index dcb4039d..e2369c56 100644
--- a/pkg_config.8.xml.amd64
+++ b/pkg_config.8.xml.amd64
@@ -153,7 +153,7 @@
Supports ACLs for smart backend switching.]]></descr>
<website>http://haproxy.1wt.eu/</website>
<category>Services</category>
- <version>1.5.3 pkg v 0.12</version>
+ <version>1.5.3 pkg v 0.13</version>
<status>Release</status>
<required_version>2.1</required_version>
<config_file>https://packages.pfsense.org/packages/config/haproxy-devel/haproxy.xml</config_file>