]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: tcp: transparent bind to the source only when address is set
authorWilly Tarreau <w@1wt.eu>
Fri, 26 Oct 2012 17:57:58 +0000 (19:57 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 26 Oct 2012 18:04:27 +0000 (20:04 +0200)
commit5f2877a7dd32a6e9cdb488d14be65851270d8c65
tree5946bf2297afcd2239a16a07be4190eabf5bdf4d
parent422a0a51611f0892507ddfa1d826394a5d04561d
BUG/MEDIUM: tcp: transparent bind to the source only when address is set

Thomas Heil reported that health checks did not work anymore when a backend
or server has "usesrc clientip". This is because the source address is not
set and tcp_bind_socket() tries to bind to that address anyway.

The solution consists in explicitly clearing the source address in the checks
and to make tcp_bind_socket() avoid binding when the address is not set. This
also has an indirect benefit that a useless bind() syscall will be avoided
when using "source 0.0.0.0 usesrc clientip" in health checks.
src/checks.c
src/proto_tcp.c