BUG/MAJOR: quic: fix wrong packet building due to already acked frames
authorFrederic Lecaille <flecaille@haproxy.com>
Mon, 25 Nov 2024 10:14:20 +0000 (11:14 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 27 Nov 2024 14:05:19 +0000 (15:05 +0100)
commit00c346726a2a168fd47eeab3040890e548146943
tree0e6456e922717a7f1571c51405eb65b0d64cd727
parent27dd4f4efe1cd4d250b8de7831e711fc37ceee68
BUG/MAJOR: quic: fix wrong packet building due to already acked frames

If a packet build was asked to probe the peer with frames which have just
been acked, the frames build run by qc_build_frms() could be cancelled  by
qc_stream_frm_is_acked() whose aim is to check that current frames to
be built have not been already acknowledged. In this case the packet build run
by qc_do_build_pkt() is not interrupted, leading to the build of an empty packet
which should be ack-eliciting.

This is a bug detected by the BUG_ON() statement in qc_do_build_pk():

    BUG_ON(qel->pktns->tx.pto_probe &&
           !(pkt->flags & QUIC_FL_TX_PACKET_ACK_ELICITING));

Thank you to @Tristan971 for having reported this issue in GH #2709

This is an old bug which must be backported as far as 2.6.

(cherry picked from commit 96b2641fc8ce58eb1875e7b525c57e58e4b794c3)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/quic_tx.c