QUIC APL: Ensure tick inhibition is not used during blocking
authorHugo Landau <hlandau@openssl.org>
Tue, 18 Jul 2023 15:14:54 +0000 (16:14 +0100)
committerMatt Caswell <matt@openssl.org>
Mon, 31 Jul 2023 13:03:25 +0000 (14:03 +0100)
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21484)

ssl/quic/quic_impl.c

index 2775a4b938ebd4fcc5c6128d5b1ee15a9a5a3b23..a725bd731082c1b12cb3f3ecf268de1558e41cdb 100644 (file)
@@ -55,6 +55,12 @@ static int block_until_pred(QUIC_CONNECTION *qc,
 
     assert(qc->ch != NULL);
 
+    /*
+     * Any attempt to block auto-disables tick inhibition as otherwise we will
+     * hang around forever.
+     */
+    ossl_quic_channel_set_inhibit_tick(qc->ch, 0);
+
     rtor = ossl_quic_channel_get_reactor(qc->ch);
     return ossl_quic_reactor_block_until_pred(rtor, pred, pred_arg, flags,
                                               qc->mutex);