]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: quic: Code sanitization about acknowledgements requirements
authorFrédéric Lécaille <flecaille@haproxy.com>
Wed, 12 Apr 2023 16:51:49 +0000 (18:51 +0200)
committerFrédéric Lécaille <flecaille@haproxy.com>
Thu, 13 Apr 2023 17:20:08 +0000 (19:20 +0200)
commit45bf1a82f1655e905a987a27909ba3aca76f660b
treeb27305263a33cabe9ac1ffae4c098e937c542baa
parenteb3e5171ed56cb5e8763b459e9fee7f74d25d235
BUG/MEDIUM: quic: Code sanitization about acknowledgements requirements

qc_may_build_pkt() has been modified several times regardless of the conditions
the functions it is supposed to allow to send packets (qc_build_pkt()/qc_do_build_pkt())
really use to finally send packets just after having received others, leading
to contraditions and possible very long loops sending empty packets (PADDING only packets)
because qc_may_build_pkt() could allow qc_build_pkt()/qc_do_build_pkt to build packet,
and the latter did nothing except sending PADDING frames, because from its point
of view they had nothing to send.

For now on, this is the job of qc_may_build_pkt() to decide to if there is
packets to send just after having received others AND to provide this information
to the qc_build_pkt()/qc_do_build_pkt()

Note that the unique case where the acknowledgements are completely ignored is
when the endpoint must probe. But at least this is when sending at most two datagrams!

This commit also fixes the issue reported by Willy about a very low throughput
performance when the client serialized its requests.

Must be backported to 2.7 and 2.6.
src/quic_conn.c