]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
QUIC QSM: Correct the logic for determining stream count limits
authorHugo Landau <hlandau@openssl.org>
Fri, 28 Apr 2023 15:56:34 +0000 (16:56 +0100)
committerHugo Landau <hlandau@openssl.org>
Wed, 24 May 2023 09:34:47 +0000 (10:34 +0100)
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20856)

ssl/quic/quic_stream_map.c

index 138a063bf62095a18550ab0b1e9a467b6c45843c..be2505d55ec7789fe500708206a899d5830dd490 100644 (file)
@@ -280,8 +280,8 @@ void ossl_quic_stream_map_update_state(QUIC_STREAM_MAP *qsm, QUIC_STREAM *s)
     int should_be_active, allowed_by_stream_limit = 1;
 
     if (qsm->get_stream_limit_cb != NULL
-        && (s->type & QUIC_STREAM_INITIATOR_CLIENT) != 0) {
-        int uni = ((s->type & QUIC_STREAM_DIR_UNI) != 0);
+        && ossl_quic_stream_is_server_init(s) == qsm->is_server) {
+        int uni = !ossl_quic_stream_is_bidi(s);
         uint64_t stream_limit, stream_ordinal = s->id >> 2;
 
         stream_limit