]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: checks: correctly configure the address family and protocol
authorWilly Tarreau <w@1wt.eu>
Fri, 9 May 2014 21:38:15 +0000 (23:38 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 9 May 2014 23:26:37 +0000 (01:26 +0200)
commit640556c692962388bd0cb5b8285f602af63839ee
tree9091c8a8bd86b94cbaf8b629924db09d2a3e05f8
parent28e9d06201a513c7a54d0feb7625849f776c6128
BUG/MINOR: checks: correctly configure the address family and protocol

Currently, mixing an IPv4 and an IPv6 address in checks happens to
work by pure luck because the two protocols use the same functions
at the socket level and both use IPPROTO_TCP. However, they're
definitely wrong as the protocol for the check address is retrieved
from the server's address.

Now the protocol assigned to the connection is the same as the one
the address in use belongs to (eg: the server's address or the
explicit check address).
src/checks.c
src/server.c