Skip to content

Commit

Permalink
Don't create an ack frame if one isn't wanted for this pn_space
Browse files Browse the repository at this point in the history
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 openssl#22568
  • Loading branch information
mattcaswell committed Oct 31, 2023
1 parent 8d13d9e commit 81ec04c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ssl/quic/quic_txp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 81ec04c

Please sign in to comment.