]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: quic: fix room check if padding requested
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 29 Aug 2025 12:17:44 +0000 (14:17 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 2 Sep 2025 08:29:11 +0000 (10:29 +0200)
commit34d5bfd23c30e08228d7939ba94a839b03716489
tree46750189b934cc4c754761de5ab745acae164001
parenta84b404b34131059dab88d5775c321cd8fdf848c
BUG/MINOR: quic: fix room check if padding requested

qc_prep_pkts() activates padding when building an Initial packet. This
ensures that resulting datagram will always be at least 1.200 bytes,
which is mandatory to prevent deadlock over anti-amplication.

Prior to padding activation, a check is performed to ensure that output
buffer is big enough for a padded datagram. However, this did not take
into account previously built packets which would be coalesced in the
same datagram. Thus this patch fixes this comparison check.

In theory, prior to this patch, in some cases Initial packets could not
be built despite a datagram of the proper size. Currently, this probably
never happens as Initial packet is always the first encoded in a
datagram, thus there is no coalesced packet prior to it. However, there
is no hard requirement on this, so it's better to reflect this in the
code.

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