aboutsummaryrefslogtreecommitdiffstats
path: root/config/haproxy-dev/haproxy.inc
diff options
context:
space:
mode:
authorthompsa <andy@fud.org.nz>2010-03-05 13:30:18 +1300
committerthompsa <andy@fud.org.nz>2010-03-05 13:30:18 +1300
commit012cd354237bda4768a7cd62ad902f0841fb78bb (patch)
treec6d33e71d1b6b215fbea70458e80c6b6bf0c290b /config/haproxy-dev/haproxy.inc
parentb80ebd2d768d5c3f8139af0eb7fce6b55d7ad059 (diff)
downloadpfsense-packages-012cd354237bda4768a7cd62ad902f0841fb78bb.tar.gz
pfsense-packages-012cd354237bda4768a7cd62ad902f0841fb78bb.tar.bz2
pfsense-packages-012cd354237bda4768a7cd62ad902f0841fb78bb.zip
Make the acl name unique by prefixing with <n++>_
Diffstat (limited to 'config/haproxy-dev/haproxy.inc')
-rw-r--r--config/haproxy-dev/haproxy.inc7
1 files changed, 5 insertions, 2 deletions
diff --git a/config/haproxy-dev/haproxy.inc b/config/haproxy-dev/haproxy.inc
index 12920103..4207a3ca 100644
--- a/config/haproxy-dev/haproxy.inc
+++ b/config/haproxy-dev/haproxy.inc
@@ -374,6 +374,7 @@ function haproxy_configure() {
fwrite ($fd, "\tdefault_backend\t\t" . $bind['defaultpool'] . "\n");
// Combine the rest of the listener configs
+ $i = 0;
foreach ($bind['config'] as $bconfig) {
$a_acl=&$bconfig['ha_acls']['item'];
if(!is_array($a_acl))
@@ -400,8 +401,10 @@ function haproxy_configure() {
else
$expr = $entry['expression'] . " " . $entry['value'];
- fwrite ($fd, "\tacl\t\t\t".$entry['name']."\t".$expr."\n");
- fwrite ($fd, "\tuse_backend\t\t$poolname if " . $entry['name'] . "\n");
+ $aclname = $i . "_" . $entry['name'];
+ fwrite ($fd, "\tacl\t\t\t" . $aclname . "\t" . $expr . "\n");
+ fwrite ($fd, "\tuse_backend\t\t" . $poolname . " if " . $aclname . "\n");
+ $i++;
}
}