summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugo Landau <hlandau@openssl.org>2023-06-12 14:13:26 +0100
committerPauli <pauli@openssl.org>2023-06-16 09:26:48 +1000
commit692a3cab11932d2aaa7b1b628cacc513ba73a5e5 (patch)
treec2cb4a02bce380fb12dc6b5707e740fddf9b9195
parent29a541fe3643921462997856c46998f9b99f440f (diff)
QUIC: Minor fixups
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21029)
-rw-r--r--ssl/quic/quic_channel.c13
-rw-r--r--ssl/quic/quic_record_rx.c2
2 files changed, 12 insertions, 3 deletions
diff --git a/ssl/quic/quic_channel.c b/ssl/quic/quic_channel.c
index 671fbeada9..586441f138 100644
--- a/ssl/quic/quic_channel.c
+++ b/ssl/quic/quic_channel.c
@@ -187,7 +187,6 @@ static int ch_init(QUIC_CHANNEL *ch)
ch->cc_method, ch->cc_data)) == NULL)
goto err;
-
if (!ossl_quic_stream_map_init(&ch->qsm, get_stream_limit, ch,
&ch->max_streams_bidi_rxfc,
&ch->max_streams_uni_rxfc,
@@ -708,7 +707,7 @@ static void rxku_detected(QUIC_PN pn, void *arg)
* if transmission of application data is going in only one direction and
* nothing else is happening with the connection. However, since the peer
* cannot initiate a subsequent (spontaneous) TXKU until its prior
- * (spontaneous or solicited) TXKU has completed - meaning that that prior
+ * (spontaneous or solicited) TXKU has completed - meaning that prior
* TXKU's trigger packet (or subsequent packet) has been acknowledged, this
* can lead to very long times before a TXKU is considered 'completed'.
* Optimise this by forcing ACK generation after triggering TXKU.
@@ -2897,3 +2896,13 @@ uint64_t ossl_quic_channel_get_rx_key_epoch(QUIC_CHANNEL *ch)
{
return ossl_qrx_get_key_epoch(ch->qrx);
}
+
+int ossl_quic_channel_trigger_txku(QUIC_CHANNEL *ch)
+{
+ if (!txku_allowed(ch))
+ return 0;
+
+ ch->ku_locally_initiated = 1;
+ ch_trigger_txku(ch);
+ return 1;
+}
diff --git a/ssl/quic/quic_record_rx.c b/ssl/quic/quic_record_rx.c
index 774cc84459..7ee352a471 100644
--- a/ssl/quic/quic_record_rx.c
+++ b/ssl/quic/quic_record_rx.c
@@ -743,7 +743,7 @@ static ossl_inline void ignore_res(int x)
static void qrx_key_update_initiated(OSSL_QRX *qrx, QUIC_PN pn)
{
if (!ossl_qrl_enc_level_set_key_update(&qrx->el_set, QUIC_ENC_LEVEL_1RTT))
- /* Returns 0 if already in RXKU, so we don't call callback again. */
+ /* We are already in RXKU, so we don't call the callback again. */
return;
if (qrx->key_update_cb != NULL)