]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: mux-quic: fix RESET_STREAM on send-only stream
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 9 Oct 2023 08:42:04 +0000 (10:42 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 11 Oct 2023 12:15:31 +0000 (14:15 +0200)
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

index 4a246c2c09b01eaa90fd3c3324921dfbf60c6511..8a765190e5e6515dbfb5bda2aff959e33484dc6f 100644 (file)
@@ -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;
        }