From: Hugo Landau Date: Fri, 28 Apr 2023 15:56:34 +0000 (+0100) Subject: QUIC FC: Correct operation of stream count mode X-Git-Tag: openssl-3.2.0-alpha1~784 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3dde3435abab4524e62af31d87bd795543822e54;p=thirdparty%2Fopenssl.git QUIC FC: Correct operation of stream count mode Reviewed-by: Matt Caswell Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/20856) --- diff --git a/ssl/quic/quic_fc.c b/ssl/quic/quic_fc.c index b016c021514..c0099fb9aca 100644 --- a/ssl/quic/quic_fc.c +++ b/ssl/quic/quic_fc.c @@ -341,7 +341,7 @@ int ossl_quic_rxfc_on_retire(QUIC_RXFC *rxfc, uint64_t num_bytes, OSSL_TIME rtt) { - if (rxfc->parent == NULL) + if (rxfc->parent == NULL && !rxfc->stream_count_mode) return 0; if (num_bytes == 0) @@ -352,7 +352,10 @@ int ossl_quic_rxfc_on_retire(QUIC_RXFC *rxfc, return 0; rxfc_on_retire(rxfc, num_bytes, 0, rtt); - rxfc_on_retire(rxfc->parent, num_bytes, rxfc->cur_window_size, rtt); + + if (!rxfc->stream_count_mode) + rxfc_on_retire(rxfc->parent, num_bytes, rxfc->cur_window_size, rtt); + return 1; }