]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: mux_quic: Dropped packet upon retransmission for closed streams
authorFrédéric Lécaille <flecaille@haproxy.com>
Mon, 2 May 2022 16:58:27 +0000 (18:58 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 3 May 2022 08:13:40 +0000 (10:13 +0200)
We rely on the largest ID which was used to open streams to know if the
stream we received STREAM frames for is closed or not. If closed, we return the
same status as the one for a STREAM frame which  was a already received one for
on open stream.

src/mux_quic.c

index e129df818acc6940e57dfe88fac7cdcf4433a7fa..d5f448ca5e0e6ac65082c3578a1b417a82f8f7e3 100644 (file)
@@ -363,8 +363,14 @@ int qcc_recv(struct qcc *qcc, uint64_t id, uint64_t len, uint64_t offset,
 
        qcs = qcc_get_qcs(qcc, id);
        if (!qcs) {
-               TRACE_DEVEL("leaving on stream not found", QMUX_EV_QCC_RECV|QMUX_EV_QCC_NQCS, qcc->conn, NULL, &id);
-               return 1;
+               if ((id >> QCS_ID_TYPE_SHIFT) <= qcc->strms[qcs_id_type(id)].largest_id) {
+                       TRACE_DEVEL("already released stream", QMUX_EV_QCC_RECV|QMUX_EV_QCC_NQCS, qcc->conn, NULL, &id);
+                       return 0;
+               }
+               else {
+                       TRACE_DEVEL("leaving on stream not found", QMUX_EV_QCC_RECV|QMUX_EV_QCC_NQCS, qcc->conn, NULL, &id);
+                       return 1;
+               }
        }
 
        *out_qcs = qcs;