]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: connection: define xprt_add_l6hs()
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 29 Apr 2026 08:12:52 +0000 (10:12 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 21 May 2026 13:09:10 +0000 (15:09 +0200)
commit9e6e0fd149be6cb2a7e96973decdb6ed875582d7
treee0751c709823a2075f0582681de09fc19bda020e
parente98595e4e5f3396ee74531be4141bf178e2180cb
MINOR: connection: define xprt_add_l6hs()

When QMux protocol is used, xprt_qmux layer is setup after SSL handshake
completion but prior to the MUX initialization. Once transport
parameters exchange is successful, the layer is removed and the MUX is
started.

The layer setup operation was performed directly on ssl_sock_io_cb().
Simplify the code by extracting it in a dedicated function
xprt_add_l6hs(). The function is generic so the requested XPRT layer
must be passed as argument.

The code is mostly identical. One difference is that a check is
performed to ensure no SSL handshake is pending. If this is the case,
the function is a noop. This will become useful to support QMux
transparently both in clear or on top of SSL.

Another minor addition is that CO_FL_XPRT_READY flag is automatically
resetted by xprt_add_l6hs(). This allows the code to use
conn_xprt_start() standard function after XPRT init.
include/haproxy/connection.h
src/connection.c
src/ssl_sock.c