]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: quic: do not prevent sending if no BE token
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 24 Nov 2025 17:08:58 +0000 (18:08 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 25 Nov 2025 13:30:18 +0000 (14:30 +0100)
commitcbfe574d8adf9f2b1e500c9740d38070db0b93dc
tree1c3d3cbdf551f13f19ed4501e168b73cc1687b34
parente27216b79932c0dea14f6fec7aff84eda01d7245
BUG/MEDIUM: quic: do not prevent sending if no BE token

For QUIC client support, a token may be emitted along with INITIAL
packets during the handshake. The token is encoded during emission via
qc_enc_token() called by qc_build_pkt().

The token may be provided from different sources. First, it can be
retrieved via <retry_token> quic_conn member when a Retry packet was
received. If not present, a token may be reused from the server cache,
populated from NEW_TOKEN received from previous a connection.

Prior to this patch, the last method may cause an issue. If the upper
connection instance is released prior to the handshake completion, this
prevents access to a possible server token. This is considered an error
by qc_enc_token(). The error is reported up to calling functions,
preventing any emission to be performed. In the end, this prevented the
either the full quic_conn release or subsizing into quic_conn_closed
until the idle timeout completion (30s by default). With abortonclose
set now by default on HTTP frontends, early client shutdowns can easily
cause excessive memory consumption.

To fix this, change qc_enc_token() so that if connection is closed, no
token is encoded but also no error is reported. This allows to continue
emission and permit early connection release.

No need to backport.
src/quic_tx.c