]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: quic: release BE quic_conn on connect failure
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 25 Nov 2025 13:37:50 +0000 (14:37 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 25 Nov 2025 13:50:23 +0000 (14:50 +0100)
commit6c08eb71738af42f93590d0cd59ffc077df485fa
treefa8571affb6cb0824a71fe2f9c64021582e2e7e9
parent346631700d5378c335ae2b1667e2270ff878a9ef
BUG/MINOR: quic: release BE quic_conn on connect failure

If quic_connect_server() fails, quic_conn FD will remain unopened as set
to -1. Backend connections do not have a fallback socket for future
exchange, contrary to frontend one which can use the listener FD. As
such, it is better to release these connections early.

This patch adjusts such failure by extending quic_close(). This function
is called by the upper layer immediately after a connect issue. In this
case, release immediately a quic_conn backend instance if the FD is
unset, which means that connect has previously failed.

Also, quic_conn_release() is extended to ensure that such faulty
connections are immediately freed and not converted into a
quic_conn_closed instance.

Prior to this patch, a backend quic_conn without any FD would remain
allocated and possibly active. If its tasklet is executed, this resulted
in a crash due to access to an invalid FD.

No need to backport.
src/quic_conn.c
src/xprt_quic.c