]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: connection: use CO_FL_WAIT_XPRT more consistently than L4/L6/HANDSHAKE
authorWilly Tarreau <w@1wt.eu>
Thu, 23 Jan 2020 15:27:54 +0000 (16:27 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 23 Jan 2020 15:34:26 +0000 (16:34 +0100)
commit911db9bd295a0a63652feaf64d1f4cce1325f9d1
treebd6a6ba42cee2aa587613a4eec40df8e9aad11a7
parent4450b587dd3065d22678d537d1082ec2567e98a8
MEDIUM: connection: use CO_FL_WAIT_XPRT more consistently than L4/L6/HANDSHAKE

As mentioned in commit c192b0ab95 ("MEDIUM: connection: remove
CO_FL_CONNECTED and only rely on CO_FL_WAIT_*"), there is a lack of
consistency on which flags are checked among L4/L6/HANDSHAKE depending
on the code areas. A number of sample fetch functions only check for
L4L6 to report MAY_CHANGE, some places only check for HANDSHAKE and
many check both L4L6 and HANDSHAKE.

This patch starts to make all of this more consistent by introducing a
new mask CO_FL_WAIT_XPRT which is the union of L4/L6/HANDSHAKE and
reports whether the transport layer is ready or not.

All inconsistent call places were updated to rely on this one each time
the goal was to check for the readiness of the transport layer.
include/types/connection.h
src/backend.c
src/checks.c
src/connection.c
src/mux_fcgi.c
src/mux_h1.c
src/mux_h2.c
src/mux_pt.c
src/session.c
src/ssl_sock.c
src/stream_interface.c