From: Tomas Mraz Date: Thu, 1 Aug 2024 17:14:16 +0000 (+0200) Subject: Return infinity time from SSL_get_event_timeout when the connection is not started X-Git-Tag: openssl-3.3.2~39 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d927ff632491b55f736879c4c5108b103aa3fe46;p=thirdparty%2Fopenssl.git Return infinity time from SSL_get_event_timeout when the connection is not started Reviewed-by: Neil Horman Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/25069) (cherry picked from commit b1f4aebb74192afb197487bf6f4998fbb87cd1c1) --- diff --git a/ssl/quic/quic_impl.c b/ssl/quic/quic_impl.c index 8884cfb7f3f..f6ddba43c5d 100644 --- a/ssl/quic/quic_impl.c +++ b/ssl/quic/quic_impl.c @@ -1088,8 +1088,9 @@ int ossl_quic_get_event_timeout(SSL *s, struct timeval *tv, int *is_infinite) quic_lock(ctx.qc); - deadline - = ossl_quic_reactor_get_tick_deadline(ossl_quic_channel_get_reactor(ctx.qc->ch)); + if (ctx.qc->started) + deadline + = ossl_quic_reactor_get_tick_deadline(ossl_quic_channel_get_reactor(ctx.qc->ch)); if (ossl_time_is_infinite(deadline)) { *is_infinite = 1;