QUIC FC: Correct operation of stream count mode

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20856)
This commit is contained in:
Hugo Landau 2023-04-28 16:56:34 +01:00
parent e8142d2ce8
commit 3dde3435ab

View File

@ -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;
}