]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: quic: Non duplicated frames upon fast retransmission
authorFrédéric Lécaille <flecaille@haproxy.com>
Wed, 30 Mar 2022 12:58:55 +0000 (14:58 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 1 Apr 2022 14:26:06 +0000 (16:26 +0200)
We must duplicate the frames to be sent again from packets which are not deemed
lost.

src/xprt_quic.c

index c48d1c251304f994f44dd9e3497d38b9f295410a..5917518710304b934c98f2c11abc7993595fe050 100644 (file)
@@ -2347,10 +2347,18 @@ static void qc_prep_hdshk_fast_retrans(struct quic_conn *qc)
        qel->pktns->tx.pto_probe += 1;
  requeue:
        list_for_each_entry_safe(frm, frmbak, &pkt->frms, list) {
+               struct quic_frame *dup_frm;
+
+
+               dup_frm = pool_alloc(pool_head_quic_frame);
+               if (!dup_frm) {
+                       TRACE_PROTO("could not duplicate frame", QUIC_EV_CONN_PRSAFRM, qc, frm);
+                       break;
+               }
+
                TRACE_PROTO("to resend frame", QUIC_EV_CONN_PRSAFRM, qc, frm);
-               LIST_DELETE(&frm->list);
-               frm->pkt = NULL;
-               LIST_APPEND(tmp, &frm->list);
+               *dup_frm = *frm;
+               LIST_APPEND(tmp, &dup_frm->list);
        }
 
        if (qel == iqel) {