]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
osslq: set out idle timeout to 0
authorStefan Eissing <stefan@eissing.org>
Tue, 7 Oct 2025 10:05:08 +0000 (12:05 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 7 Oct 2025 15:23:24 +0000 (17:23 +0200)
Similar to our ngtcp2 backend, set our idle timeout for the connection
to 0, meaning we have no such timeout from our side. The effective idle
timeout is then the one announced by the peer.

Closes #18907

lib/vquic/curl_osslq.c

index 3fd2daf92fbd0f381a2c0e52a2fc810852fea08d..4d72797199c5d81511e9e9211d857b81d95f8e30 100644 (file)
@@ -288,7 +288,6 @@ struct cf_osslq_ctx {
   struct bufc_pool stream_bufcp;     /* chunk pool for streams */
   struct uint_hash streams;          /* hash `data->mid` to `h3_stream_ctx` */
   size_t max_stream_window;          /* max flow window for one stream */
-  uint64_t max_idle_ms;              /* max idle time for QUIC connection */
   SSL_POLL_ITEM *poll_items;         /* Array for polling on writable state */
   struct Curl_easy **curl_items;     /* Array of easy objs */
   size_t items_max;                  /* max elements in poll/curl_items */
@@ -1228,6 +1227,9 @@ static CURLcode cf_osslq_ctx_start(struct Curl_cfilter *cf,
   SSL_set_connect_state(ctx->tls.ossl.ssl);
   SSL_set_incoming_stream_policy(ctx->tls.ossl.ssl,
                                  SSL_INCOMING_STREAM_POLICY_ACCEPT, 0);
+  /* from our side, there is no idle timeout */
+  SSL_set_value_uint(ctx->tls.ossl.ssl,
+    SSL_VALUE_CLASS_FEATURE_REQUEST, SSL_VALUE_QUIC_IDLE_TIMEOUT, 0);
   /* setup the H3 things on top of the QUIC connection */
   result = cf_osslq_h3conn_init(ctx, ctx->tls.ossl.ssl, cf);
 
@@ -2243,7 +2245,7 @@ static bool cf_osslq_conn_is_alive(struct Curl_cfilter *cf,
   /* Added in OpenSSL v3.3.x */
   {
     timediff_t idletime;
-    uint64_t idle_ms = ctx->max_idle_ms;
+    uint64_t idle_ms = 0;
     if(!SSL_get_value_uint(ctx->tls.ossl.ssl,
                            SSL_VALUE_CLASS_FEATURE_NEGOTIATED,
                            SSL_VALUE_QUIC_IDLE_TIMEOUT, &idle_ms)) {