summaryrefslogtreecommitdiffstats
path: root/ssl
diff options
context:
space:
mode:
authorHugo Landau <hlandau@openssl.org>2023-10-23 15:38:16 +0100
committerMatt Caswell <matt@openssl.org>2023-10-25 11:14:24 +0100
commit4d100bb76ad43da75660fa8661d258eaa78fb1c3 (patch)
treecd0320767eb14b1237afd468a01be52328c695e2 /ssl
parent82b7a0eee90e3280bd0e2dd4a9812b3873a7f462 (diff)
QUIC CHANNEL: Correct timeout calculation for ACKs
ACKs are not restricted by CC so do not consider CC when determining when we will emit an ACK. Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/22476)
Diffstat (limited to 'ssl')
-rw-r--r--ssl/quic/quic_channel.c30
1 files changed, 14 insertions, 16 deletions
diff --git a/ssl/quic/quic_channel.c b/ssl/quic/quic_channel.c
index fe2a924433..a956fa4f68 100644
--- a/ssl/quic/quic_channel.c
+++ b/ssl/quic/quic_channel.c
@@ -2608,26 +2608,24 @@ static OSSL_TIME ch_determine_next_tick_deadline(QUIC_CHANNEL *ch)
deadline = ossl_time_infinite();
/*
- * If the CC will let us send acks, check the ack deadline for all
- * enc_levels that are actually provisioned
+ * Check the ack deadline for all enc_levels that are actually provisioned.
+ * ACKs aren't restricted by CC.
*/
- if (ch->cc_method->get_tx_allowance(ch->cc_data) > 0) {
- for (i = 0; i < QUIC_ENC_LEVEL_NUM; i++) {
- if (ossl_qtx_is_enc_level_provisioned(ch->qtx, i)) {
- deadline = ossl_time_min(deadline,
- ossl_ackm_get_ack_deadline(ch->ackm,
- ossl_quic_enc_level_to_pn_space(i)));
- }
+ for (i = 0; i < QUIC_ENC_LEVEL_NUM; i++) {
+ if (ossl_qtx_is_enc_level_provisioned(ch->qtx, i)) {
+ deadline = ossl_time_min(deadline,
+ ossl_ackm_get_ack_deadline(ch->ackm,
+ ossl_quic_enc_level_to_pn_space(i)));
}
-
- /*
- * When do we need to send an ACK-eliciting packet to reset the idle
- * deadline timer for the peer?
- */
- if (!ossl_time_is_infinite(ch->ping_deadline))
- deadline = ossl_time_min(deadline, ch->ping_deadline);
}
+ /*
+ * When do we need to send an ACK-eliciting packet to reset the idle
+ * deadline timer for the peer?
+ */
+ if (!ossl_time_is_infinite(ch->ping_deadline))
+ deadline = ossl_time_min(deadline, ch->ping_deadline);
+
/* Apply TXP wakeup deadline. */
deadline = ossl_time_min(deadline,
ossl_quic_tx_packetiser_get_deadline(ch->txp));