summaryrefslogtreecommitdiffstats
path: root/ssl
diff options
context:
space:
mode:
authorHugo Landau <hlandau@openssl.org>2023-04-28 16:56:34 +0100
committerHugo Landau <hlandau@openssl.org>2023-05-24 10:34:47 +0100
commit5915a900af86db8625caa77a02fd50cf9a3b3e1b (patch)
treee5b1eb84756d90e850855f3452cbbd2827e7e7bb /ssl
parentfca44cfc1c930afab94fac08ad5a3a303f1724fe (diff)
QUIC QSM: Allow QSM to know if we are in the server role
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/20856)
Diffstat (limited to 'ssl')
-rw-r--r--ssl/quic/quic_channel.c4
-rw-r--r--ssl/quic/quic_stream_map.c4
2 files changed, 5 insertions, 3 deletions
diff --git a/ssl/quic/quic_channel.c b/ssl/quic/quic_channel.c
index 6e0af86760..4325434c4f 100644
--- a/ssl/quic/quic_channel.c
+++ b/ssl/quic/quic_channel.c
@@ -186,7 +186,8 @@ static int ch_init(QUIC_CHANNEL *ch)
if (!ossl_quic_stream_map_init(&ch->qsm, get_stream_limit, ch,
&ch->max_streams_bidi_rxfc,
- &ch->max_streams_uni_rxfc))
+ &ch->max_streams_uni_rxfc,
+ ch->is_server))
goto err;
ch->have_qsm = 1;
@@ -2426,7 +2427,6 @@ QUIC_STREAM *ossl_quic_channel_new_stream_local(QUIC_CHANNEL *ch, int is_uni)
if (!ch_init_new_stream(ch, qs, /*can_send=*/1, /*can_recv=*/!is_uni))
goto err;
-
++*p_next_ordinal;
return qs;
diff --git a/ssl/quic/quic_stream_map.c b/ssl/quic/quic_stream_map.c
index 680fe48ad9..138a063bf6 100644
--- a/ssl/quic/quic_stream_map.c
+++ b/ssl/quic/quic_stream_map.c
@@ -89,7 +89,8 @@ int ossl_quic_stream_map_init(QUIC_STREAM_MAP *qsm,
uint64_t (*get_stream_limit_cb)(int uni, void *arg),
void *get_stream_limit_cb_arg,
QUIC_RXFC *max_streams_bidi_rxfc,
- QUIC_RXFC *max_streams_uni_rxfc)
+ QUIC_RXFC *max_streams_uni_rxfc,
+ int is_server)
{
qsm->map = lh_QUIC_STREAM_new(hash_stream, cmp_stream);
qsm->active_list.prev = qsm->active_list.next = &qsm->active_list;
@@ -105,6 +106,7 @@ int ossl_quic_stream_map_init(QUIC_STREAM_MAP *qsm,
qsm->get_stream_limit_cb_arg = get_stream_limit_cb_arg;
qsm->max_streams_bidi_rxfc = max_streams_bidi_rxfc;
qsm->max_streams_uni_rxfc = max_streams_uni_rxfc;
+ qsm->is_server = is_server;
return 1;
}