]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: mux-quic: emit STREAM_LIMIT_ERROR
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 20 May 2022 14:45:32 +0000 (16:45 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 20 May 2022 15:52:07 +0000 (17:52 +0200)
Send a CONNECTION_CLOSE on reception of a STREAM frame for a STREAM id
exceeding the maximum value enforced. Only implemented for bidirectional
streams for the moment.

src/mux_quic.c

index 8485f818bb87063fda1316bd323329c80c35c70c..443eee7f06ffb48bd6028582d68b27d90d301efc 100644 (file)
@@ -384,7 +384,14 @@ struct qcs *qcc_get_qcs(struct qcc *qcc, uint64_t id)
                /* TODO also checks max-streams for uni streams */
                if (quic_stream_is_bidi(id)) {
                        if (sub_id + 1 > qcc->lfctl.ms_bidi) {
-                               /* streams limit reached */
+                               /* RFC 9000 4.6. Controlling Concurrency
+                                *
+                                * An endpoint that receives a frame with a
+                                * stream ID exceeding the limit it has sent
+                                * MUST treat this as a connection error of
+                                * type STREAM_LIMIT_ERROR
+                                */
+                               qcc_emit_cc(qcc, QC_ERR_STREAM_LIMIT_ERROR);
                                goto out;
                        }
                }