BUG/MINOR: tcpcheck: Set socks4 and send-proxy flags before the connect call
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 2 Oct 2020 11:41:55 +0000 (13:41 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 2 Oct 2020 15:14:34 +0000 (17:14 +0200)
commitf7177271f32f51876f16ed3d3f9770ba232dc244
tree2bd196a2da4f59721699d4b841ae44c93c27c530
parent2079a4ad36d0ea01ee2a91c7fc26baa335fd3747
BUG/MINOR: tcpcheck: Set socks4 and send-proxy flags before the connect call

Since the health-check refactoring in the 2.2, the checks through a socks4 proxy
are broken. To fix this bug, CO_FL_SOCKS4 flag must be set on the connection
before calling the connect() callback function because this flags is checked to
use the right destination address. The same is done for the CO_FL_SEND_PROXY
flag for a consistency purpose.

A reg-test has been added to test the "check-via-socks4" directive.

This patch must be backported to 2.2.
reg-tests/checks/tcp-checks-socks4.vtc [new file with mode: 0644]
src/tcpcheck.c