]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
QUIC FC: Correct operation of stream count mode
authorHugo Landau <hlandau@openssl.org>
Fri, 28 Apr 2023 15:56:34 +0000 (16:56 +0100)
committerHugo Landau <hlandau@openssl.org>
Wed, 24 May 2023 09:34:47 +0000 (10:34 +0100)
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20856)

ssl/quic/quic_fc.c

index b016c021514b036787d4dde53ec0e1168b75784c..c0099fb9aca56d543d32feea49e2f1455dac0244 100644 (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;
 }