If we want to send a CONNECTION_CLOSE frame then one is enough unless we
are scheduled to send another one. Now that we can create more than one
datagram in one go this is now required.
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21798)
unsigned int had_max_streams_bidi_frame : 1;
unsigned int had_max_streams_uni_frame : 1;
unsigned int had_ack_frame : 1;
+ unsigned int had_conn_close : 1;
/* Private data follows. */
} QUIC_TXPIM_PKT;
if (!tx_helper_commit(h))
return 0;
+ tpkt->had_conn_close = 1;
*can_be_non_inflight = 0;
} else {
tx_helper_rollback(h);
if (tpkt->had_ack_frame)
txp->want_ack &= ~(1UL << pn_space);
+ if (tpkt->had_conn_close)
+ txp->want_conn_close = 0;
+
/*
* Decrement probe request counts if we have sent a packet that meets
* the requirement of a probe, namely being ACK-eliciting.
ex->public.had_max_streams_bidi_frame = 0;
ex->public.had_max_streams_uni_frame = 0;
ex->public.had_ack_frame = 0;
+ ex->public.had_conn_close = 0;
}
QUIC_TXPIM_PKT *ossl_quic_txpim_pkt_alloc(QUIC_TXPIM *txpim)