]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: connection: merge the send_proxy and local_send_proxy calls
authorWilly Tarreau <w@1wt.eu>
Thu, 24 Oct 2013 20:01:26 +0000 (22:01 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 9 Dec 2013 14:40:23 +0000 (15:40 +0100)
commit57cd3e46b9cc990e8aae538960a72ceabc49db6e
tree9fcbae34b9d81907fcb63e6a334807a2c7346ba1
parent1ec74bf660f48f57e308bef4b5df4c8507dffcb9
MEDIUM: connection: merge the send_proxy and local_send_proxy calls

We used to have two very similar functions for sending a PROXY protocol
line header. The reason is that the default one relies on the stream
interface to retrieve the other end's address, while the "local" one
performs a local address lookup and sends that instead (used by health
checks).

Now that the send_proxy_ofs is stored in the connection and not the
stream interface, we can make the local_send_proxy rely on it and
support partial sends. This also simplifies the code by removing the
local_send_proxy function, making health checks use send_proxy_ofs,
resulting in the removal of the CO_FL_LOCAL_SPROXY flag, and the
associated test in the connection handler. The other flag,
CO_FL_SI_SEND_PROXY was renamed without the "SI" part so that it
is clear that it is not dedicated anymore to a usage with a stream
interface.
include/proto/connection.h
include/types/connection.h
src/checks.c
src/connection.c
src/proto_tcp.c
src/stream_interface.c