From: Hugo Landau Date: Tue, 6 Jun 2023 15:25:12 +0000 (+0100) Subject: QUIC CONFORMANCE: Wire the DATA_SENT state X-Git-Tag: openssl-3.2.0-alpha1~428 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c068f4d1e91e04b9da5c430b1e18c190c2460aad;p=thirdparty%2Fopenssl.git QUIC CONFORMANCE: Wire the DATA_SENT state Reviewed-by: Tomas Mraz Reviewed-by: Matt Caswell Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/21135) --- diff --git a/ssl/quic/quic_txp.c b/ssl/quic/quic_txp.c index dcfdca22649..313c2fef362 100644 --- a/ssl/quic/quic_txp.c +++ b/ssl/quic/quic_txp.c @@ -2372,8 +2372,16 @@ static int txp_generate_for_el_actual(OSSL_QUIC_TX_PACKETISER *txp, */ ossl_quic_stream_map_update_state(txp->args.qsm, stream); - if (stream->txp_drained) + if (stream->txp_drained) { assert(!ossl_quic_sstream_has_pending(stream->sstream)); + + /* + * Transition to DATA_SENT if stream has a final size and we have + * sent all data. + */ + if (ossl_quic_sstream_get_final_size(stream->sstream, NULL)) + ossl_quic_stream_map_notify_all_data_sent(txp->args.qsm, stream); + } } /* We have now sent the packet, so update state accordingly. */