]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: mux_quic: do not interrupt recv on error/incomplete data quic-interop flx04/master flx04/quic-interop
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 5 Jun 2026 08:22:50 +0000 (10:22 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 5 Jun 2026 14:27:10 +0000 (16:27 +0200)
Prior to this patch, qcc_io_recv() stream decoding loop was interrupted
on the first decoding error or if incomplete data could not be parsed.

This patch adjusts this part so that loop is stopped only on a
connection level error. In case of a stream level error or on incomplete
data, decoding continues on the next QCS entry.

Without this patch, there is a risk that a QCS decode is not performed
as expected, with a possible client timeout firing. This is pretty
unlikely though. However this patch is still necessary to remove
completely this possibility.

This should be backported up to 3.2.

src/mux_quic.c

index a6c4983f7bc56463979a4a1b2d31c8b97e21a872..509e3aa7afe1398648eb85ae5521215637bb4366 100644 (file)
@@ -3319,6 +3319,7 @@ static int qcc_io_recv(struct qcc *qcc)
                        qcc_qmux_recv(qcc);
        }
 
+ next_recv:
        while (!LIST_ISEMPTY(&qcc->recv_list)) {
                qcs = LIST_ELEM(qcc->recv_list.n, struct qcs *, el_recv);
                /* No need to add an uni local stream in recv_list. */
@@ -3328,7 +3329,11 @@ static int qcc_io_recv(struct qcc *qcc)
                        ret = qcc_decode_qcs(qcc, qcs);
                        if (ret <= 0) {
                                LIST_DEL_INIT(&qcs->el_recv);
-                               goto done;
+                               /* Interrupt all receive if connection on error. */
+                               if (qcc->flags & QC_CF_ERRL)
+                                       goto done;
+                               /* Decode next entry if stream on error. */
+                               goto next_recv;
                        }
 
                        total += ret;