diff options
author | Hugo Landau <hlandau@openssl.org> | 2023-04-18 19:30:56 +0100 |
---|---|---|
committer | Hugo Landau <hlandau@openssl.org> | 2023-05-12 14:47:13 +0100 |
commit | acc6fde0d44d22c7fa4578c967aee69c3fbcf350 (patch) | |
tree | b9f04d7619c06818a7bb4054a689d00bb826bbfd /ssl | |
parent | f0e22d1be8a66106932f6f7c069087372ff33789 (diff) |
QUIC APL: Fix a bug where incoming unidirectional streams weren't detected
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20765)
Diffstat (limited to 'ssl')
-rw-r--r-- | ssl/quic/quic_impl.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/ssl/quic/quic_impl.c b/ssl/quic/quic_impl.c index d74ed36256..cce1bde5c4 100644 --- a/ssl/quic/quic_impl.c +++ b/ssl/quic/quic_impl.c @@ -1225,7 +1225,11 @@ static int quic_wait_for_stream(void *arg) } args->qs = ossl_quic_stream_map_get_by_id(ossl_quic_channel_get_qsm(args->qc->ch), - args->expect_id); + args->expect_id | QUIC_STREAM_DIR_BIDI); + if (args->qs == NULL) + args->qs = ossl_quic_stream_map_get_by_id(ossl_quic_channel_get_qsm(args->qc->ch), + args->expect_id | QUIC_STREAM_DIR_UNI); + if (args->qs != NULL) return 1; /* stream now exists */ @@ -1259,12 +1263,12 @@ static int qc_wait_for_default_xso_for_read(QUIC_CONNECTION *qc) ? QUIC_STREAM_INITIATOR_CLIENT : QUIC_STREAM_INITIATOR_SERVER; - expect_id |= (qc->default_stream_mode == SSL_DEFAULT_STREAM_MODE_AUTO_UNI) - ? QUIC_STREAM_DIR_UNI - : QUIC_STREAM_DIR_BIDI; - qs = ossl_quic_stream_map_get_by_id(ossl_quic_channel_get_qsm(qc->ch), - expect_id); + expect_id | QUIC_STREAM_DIR_BIDI); + if (qs == NULL) + qs = ossl_quic_stream_map_get_by_id(ossl_quic_channel_get_qsm(qc->ch), + expect_id | QUIC_STREAM_DIR_UNI); + if (qs == NULL) { ossl_quic_reactor_tick(ossl_quic_channel_get_reactor(qc->ch), 0); |