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)
/* 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);