aboutsummaryrefslogtreecommitdiffstats
path: root/config/haproxy-devel/haproxy.inc
diff options
context:
space:
mode:
authorPiBa-NL <pba_2k3@yahoo.com>2013-06-22 00:26:17 +0200
committerPiBa-NL <pba_2k3@yahoo.com>2013-06-22 00:26:17 +0200
commit2fcd42a78c7f6fb9944a832eac820e7cf08c0226 (patch)
tree7a174417d3e8bd245ee182daf08eb1c0b89ed8f6 /config/haproxy-devel/haproxy.inc
parent268bcb9a886494c81191ec63e220ec1c02508b65 (diff)
downloadpfsense-packages-2fcd42a78c7f6fb9944a832eac820e7cf08c0226.tar.gz
pfsense-packages-2fcd42a78c7f6fb9944a832eac820e7cf08c0226.tar.bz2
pfsense-packages-2fcd42a78c7f6fb9944a832eac820e7cf08c0226.zip
haproxy-devel, 'transparent proxy' bugfix, proper interfaces initialized for 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) {