]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: quic: fix FD usage for quic_conn_closed on backend side
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 19 Nov 2025 10:41:05 +0000 (11:41 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 19 Nov 2025 15:02:22 +0000 (16:02 +0100)
commitd54d78fe9af30f38e9ffc999bc562b965bb16795
tree1f0156143685a27c758cadabb10dcaf2862d7dbf
parent46c5c232d72e9c2f193f654bc5b7529e02441fce
BUG/MINOR: quic: fix FD usage for quic_conn_closed on backend side

On the frontend side, QUIC transfer can be performed either via a
connection owned FD or multiplex on the listener one. When a quic_conn
is freed and converted to quic_conn_closed instance, its FD if open is
closed and all exchanges are now multiplex via the listener FD.

This is different for the backend as connections only has the choice to
use their owned FD. Thus, special care care must be taken when freeing a
connection and converting it to a quic_conn_closed instance. In this
case, qc_release_fd() is delayed to the quic_conn_closed release.

Furthermore, when the FD is transferred, its iocb and owner fields are
updated to the new quic_conn_closed instance. Without it, a crash will
occur when accessing the freed quic_conn tasklet. A newly dedicated
handler quic_conn_closed_sock_fd_iocb is used to ensure access to
quic_conn_closed members only.
include/haproxy/quic_sock.h
src/quic_conn.c
src/quic_sock.c