From d85f9f9d439e4d482b9ff96bb7c157fd4007a6c1 Mon Sep 17 00:00:00 2001 From: Amaury Denoyelle Date: Mon, 9 Oct 2023 10:42:04 +0200 Subject: [PATCH] BUG/MEDIUM: mux-quic: fix RESET_STREAM on send-only stream When receiving a RESET_STREAM on a send-only stream, it is mandatory to close the connection with an error STREAM_STATE error. However, this was badly implemented as this caused two invocation of qcc_set_error() which is forbidden by the mux-quic API. To fix this, rely on qcc_get_qcs() to properly detect the error. Remove qcc_set_error() usage from qcc_recv_reset_stream() instead. This must be backported up to 2.7. --- src/mux_quic.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/mux_quic.c b/src/mux_quic.c index 4a246c2c09..8a765190e5 100644 --- a/src/mux_quic.c +++ b/src/mux_quic.c @@ -1270,7 +1270,6 @@ int qcc_recv_reset_stream(struct qcc *qcc, uint64_t id, uint64_t err, uint64_t f */ if (qcc_get_qcs(qcc, id, 1, 0, &qcs)) { TRACE_ERROR("RESET_STREAM for send-only stream received", QMUX_EV_QCC_RECV|QMUX_EV_QCS_RECV, qcc->conn, qcs); - qcc_set_error(qcc, QC_ERR_STREAM_STATE_ERROR, 0); goto err; } -- 2.47.3