Skip to content

Commit df2278c

Browse files
committed
Explicitly use -m ip. haproxy's docs are wrong and it's actually required
1 parent 4e84e87 commit df2278c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ansible/roles/proxy-haproxy/templates/haproxy.cfg.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ frontend scripts_http_frontend
6060
http-request capture var(txn.ldapip) len 40
6161
# everything but '%[capture.req.hdr(0)]' is the default http log format. '%[capture.req.header(0)]' gets the first thing we captured, which in this case is txn.ldapip.
6262
log-format "%ci:%cp [%tr] %ft %b/%s %TR/%Tw/%Tc/%Tr/%Ta %ST %B %CC %CS %tsc %ac/%fc/%bc/%sc/%rc %sq/%bq %hr %hs %{+Q}r %[capture.req.hdr(0)]"
63-
use_backend scripts_http_offnet_backend if ! { var(txn.ldapip) 18.4.86.0/24 }
63+
use_backend scripts_http_offnet_backend if ! { var(txn.ldapip) -m ip 18.4.86.0/24 }
6464
default_backend scripts_http_backend
6565

6666
frontend scripts_tcp_frontend
@@ -73,7 +73,7 @@ frontend scripts_tcp_frontend
7373
# everything but '%[capture.req.hdr(0)]' is the default tcp log format.
7474
log-format "%ci:%cp [%t] %ft %b/%s %Tw/%Tc/%Tt %B %ts %ac/%fc/%bc/%sc/%rc %sq/%bq %[capture.req.hdr(0)]"
7575
tcp-request content accept if { req.ssl_hello_type 1 } { var(txn.ldapip) -m found }
76-
use_backend scripts_tcp_offnet_backend if ! { var(txn.ldapip) 18.4.86.0/24 }
76+
use_backend scripts_tcp_offnet_backend if ! { var(txn.ldapip) -m ip 18.4.86.0/24 }
7777
default_backend scripts_tcp_backend
7878

7979
backend scripts_http_backend

0 commit comments

Comments
 (0)