]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: quic: ensure empty packets are never built 20250812-ade-quic-fix-padding
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 12 Aug 2025 08:39:48 +0000 (10:39 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 12 Aug 2025 14:52:57 +0000 (16:52 +0200)
commite11cd9966e23a42f608e1881674856b0d41860e6
tree6e7ff7686ee6078f34bed9b7b58122811a396b4b
parentf2c24ae7f14863ca903903f7d8f4b1b453bff735
MEDIUM: quic: ensure empty packets are never built

Previously, qc_do_build_pkt() had a special case when an empty packet
was generated. In this case, a PADDING frame was inserted. This specific
block was removed as padding support was centralized by the previous
patch.

However, such empty packets have no real purpose, and also are non
efficient. Add a BUG_ON() to ensure that caller never invoke
qc_do_build_pkt() if there is no data to emit.

qc_do_build_pkt() is a tedious function which already had some issues.
As such, this change is labelled as MEDIUM, as it is not 100% sure that
empty packet case is never encountered during emission.
src/quic_tx.c