From: Amaury Denoyelle Date: Fri, 5 Jun 2026 08:22:50 +0000 (+0200) Subject: BUG/MINOR: mux_quic: do not interrupt recv on error/incomplete data X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=refs%2Fremotes%2Fflx04%2Fquic-interop;p=thirdparty%2Fhaproxy.git BUG/MINOR: mux_quic: do not interrupt recv on error/incomplete data 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. --- diff --git a/src/mux_quic.c b/src/mux_quic.c index a6c4983f7..509e3aa7a 100644 --- a/src/mux_quic.c +++ b/src/mux_quic.c @@ -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;