summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2023-10-31 16:24:44 +0000
committerTomas Mraz <tomas@openssl.org>2023-11-01 19:07:43 +0100
commit4febab7d808c2c746ded9424ceff4163bdae3278 (patch)
treecbfe8da9c8df68ec2dd572f7a7c5c5a3bebe8d37
parent0d4a8667e25406b39785c6d4a25b34a825eb798a (diff)
Don't create an ack frame if one isn't wanted for this pn_space
The txp->want_ack value has different bit values for different pn_space values. Make sure we take that into account when we read it. Fixes #22568 Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/22579) (cherry picked from commit d13488b93690121bd50c97599760a19ead6bcd1f)
-rw-r--r--ssl/quic/quic_txp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ssl/quic/quic_txp.c b/ssl/quic/quic_txp.c
index ce59900f14..2af385af0f 100644
--- a/ssl/quic/quic_txp.c
+++ b/ssl/quic/quic_txp.c
@@ -1786,7 +1786,7 @@ static int txp_generate_pre_token(OSSL_QUIC_TX_PACKETISER *txp,
/* ACK Frames (Regenerate) */
if (a->allow_ack
&& tx_helper_get_space_left(h) >= MIN_FRAME_SIZE_ACK
- && (txp->want_ack
+ && (((txp->want_ack & (1UL << pn_space)) != 0)
|| ossl_ackm_is_ack_desired(txp->args.ackm, pn_space))
&& (ack = ossl_ackm_get_ack_frame(txp->args.ackm, pn_space)) != NULL) {
WPACKET *wpkt = tx_helper_begin(h);