diff options
author | Matt Caswell <matt@openssl.org> | 2023-08-18 11:55:50 +0100 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2023-08-25 08:42:39 +0200 |
commit | 0b31072e086dc9a53f62cec60ea8d565320e640a (patch) | |
tree | 2896c53e51eefadbf43547079eb61b8d9b5596f0 /ssl | |
parent | aa433014bb36bfff0af17c0eb9d25b6fb2d7d068 (diff) |
Don't keep creating CONNECTION_CLOSE frames
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)
Diffstat (limited to 'ssl')
-rw-r--r-- | ssl/quic/quic_txp.c | 4 | ||||
-rw-r--r-- | ssl/quic/quic_txpim.c | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/ssl/quic/quic_txp.c b/ssl/quic/quic_txp.c index 54b691c9ba..51802ba7b6 100644 --- a/ssl/quic/quic_txp.c +++ b/ssl/quic/quic_txp.c @@ -1804,6 +1804,7 @@ static int txp_generate_pre_token(OSSL_QUIC_TX_PACKETISER *txp, if (!tx_helper_commit(h)) return 0; + tpkt->had_conn_close = 1; *can_be_non_inflight = 0; } else { tx_helper_rollback(h); @@ -2944,6 +2945,9 @@ static int txp_pkt_commit(OSSL_QUIC_TX_PACKETISER *txp, 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. diff --git a/ssl/quic/quic_txpim.c b/ssl/quic/quic_txpim.c index 3a7662292b..716a0141ab 100644 --- a/ssl/quic/quic_txpim.c +++ b/ssl/quic/quic_txpim.c @@ -115,6 +115,7 @@ static void txpim_clear(QUIC_TXPIM_PKT_EX *ex) 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) |