]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: quic: Missing retransmission from qc_prep_fast_retrans()
authorFrédéric Lécaille <flecaille@haproxy.com>
Thu, 6 Jan 2022 16:28:05 +0000 (17:28 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 7 Jan 2022 16:58:26 +0000 (17:58 +0100)
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.

src/xprt_quic.c

index ca21b1f376b681e2e9b1bedc0fb051e8e9d518a6..f1adc19a8e48bcbecc742f315c4b465d9b8dcaba 100644 (file)
@@ -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] &&