aboutsummaryrefslogtreecommitdiffstats
path: root/config/haproxy-devel/haproxy.inc
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2013-06-22 04:02:46 -0700
committerErmal Luçi <eri@pfsense.org>2013-06-22 04:02:46 -0700
commitde530b05cef3bd3bc65beaa86df84c99ea8911a9 (patch)
tree193ac6ef9161f5d95bab305247055a66ceb04471 /config/haproxy-devel/haproxy.inc
parentacd0748c3a719bf81c370b3f70b61df85f570806 (diff)
parent2fcd42a78c7f6fb9944a832eac820e7cf08c0226 (diff)
downloadpfsense-packages-de530b05cef3bd3bc65beaa86df84c99ea8911a9.tar.gz
pfsense-packages-de530b05cef3bd3bc65beaa86df84c99ea8911a9.tar.bz2
pfsense-packages-de530b05cef3bd3bc65beaa86df84c99ea8911a9.zip
Merge pull request #463 from PiBa-NL/haproxy-devel_fix
haproxy-devel, 'transparent proxy' bugfix, proper interfaces initialized for use with ipfw
Diffstat (limited to 'config/haproxy-devel/haproxy.inc')
-rw-r--r--config/haproxy-devel/haproxy.inc10
1 files changed, 8 insertions, 2 deletions
diff --git a/config/haproxy-devel/haproxy.inc b/config/haproxy-devel/haproxy.inc
index b5ca35cd..3afefb49 100644
--- a/config/haproxy-devel/haproxy.inc
+++ b/config/haproxy-devel/haproxy.inc
@@ -887,6 +887,7 @@ function load_ipfw_rules() {
haproxy_load_modules();
+ $transparent_interfaces = array();
$transparent_backends = array();
foreach ($a_backends as $backend) {
if ($backend["transparent_clientip"] != 'yes')
@@ -904,14 +905,19 @@ function load_ipfw_rules() {
$item = array();
$item['address'] = $be['address'];
$item['port'] = $be['port'];
- $item['interface'] = $real_if;//"em0";
+ $item['interface'] = $real_if;
$transparent_backends[] = $item;
+ $transparent_interfaces[$real_if] = 1;
}
}
}
}
mwexec("/usr/local/sbin/ipfw_context -a $ipfw_zone_haproxy", true);
- mwexec("/usr/local/sbin/ipfw_context -a $ipfw_zone_haproxy -n em0", true);
+
+ foreach($transparent_interfaces as $transparent_if => $value) {
+ mwexec("/usr/local/sbin/ipfw_context -a $ipfw_zone_haproxy -n $transparent_if", true);
+ }
+
$rulenum = 64000; // why that high? captiveportal.inc also does it...
$rules = "flush\n";
foreach($transparent_backends as $transparent_be) {