]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: quic: don't coalesce probing and ACK packet of same type master quic-interop
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 11 Aug 2025 16:04:59 +0000 (18:04 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 22 Aug 2025 16:20:42 +0000 (18:20 +0200)
commit7d554ca6295033cbf1b82a15980ae8c0a0c94ec3
tree66280dc690667c657675f607dd5cd50fca958e9c
parent8bc339a6ad4702f2c39b2a78aaaff665d85c762b
BUG/MINOR: quic: don't coalesce probing and ACK packet of same type

Haproxy QUIC stack suffers from a limitation : it's not possible to emit
a packet which contains probing data and a ACK frame in it. Thus, in
case qc_do_build_pkt() is invoked which both values as true, probing has
the priority and ACK is ignored.

However, this has the undesired side-effect of possibly generating two
coalesced packets of the same type in the same datagram : the first one
with the probing data and the second with an ACK frame. This is caused
by qc_prep_pkts() loop which may call qc_do_build_pkt() multiple times
with the same QEL instance. This case is normally use when a full
datagram has been built but there is still content to emit on the
current encryption level.

To fix this, alter qc_prep_pkts() loop : if both probing and ACK is
requested, force the datagram to be written after packet encoding. This
will result in a datagram containing the packet with probing data as
final entry. A new datagram is started for the next packet which will
can contain the ACK frame.

This also has some impact on INITIAL padding. Indeed, if packet must be
the last due to probing emission, qc_prep_pkts() will also activate
padding to ensure final datagram is at least 1.200 bytes long.

Note that coalescing two packets of the same type is not invalid
according to QUIC RFC. However it could cause issue with some shaky
implementations, so it is considered as a bug.

This must be backported up to 2.6.
src/quic_tx.c