From: Frédéric Lécaille Date: Thu, 6 Jan 2022 16:28:05 +0000 (+0100) Subject: MINOR: quic: Missing retransmission from qc_prep_fast_retrans() X-Git-Tag: v2.6-dev1~158 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f010f0aaf29fe6a280734d2ebe8eeabe5de3af96;p=thirdparty%2Fhaproxy.git MINOR: quic: Missing retransmission from qc_prep_fast_retrans() In fact we must look for the first packet with some ack-elicting frame to in the packet number space tree to retransmit from. Obviously there may be already retransmit packets which are not deemed as lost and still present in the packet number space tree for TX packets. --- diff --git a/src/xprt_quic.c b/src/xprt_quic.c index ca21b1f376..f1adc19a8e 100644 --- a/src/xprt_quic.c +++ b/src/xprt_quic.c @@ -2189,12 +2189,20 @@ static void qc_prep_fast_retrans(struct quic_enc_level *qel, struct quic_frame *frm, *frmbak; start: + pkt = NULL; pkts = &qel->pktns->tx.pkts; node = eb64_first(pkts); - if (!node) + /* Skip the empty packet (they have already been retransmitted) */ + while (node) { + pkt = eb64_entry(&node->node, struct quic_tx_packet, pn_node); + if (!LIST_ISEMPTY(&pkt->frms)) + break; + node = eb64_next(node); + } + + if (!pkt) return; - pkt = eb64_entry(&node->node, struct quic_tx_packet, pn_node); list_for_each_entry_safe(frm, frmbak, &pkt->frms, list) qc_treat_nacked_tx_frm(qc, frm, qel->pktns); if (qel == &qc->els[QUIC_TLS_ENC_LEVEL_INITIAL] &&