]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Use the reactor from ctx.obj for net read/write desired implementations
authorMatt Caswell <matt@openssl.org>
Wed, 9 Oct 2024 10:31:46 +0000 (11:31 +0100)
committerNeil Horman <nhorman@openssl.org>
Mon, 17 Feb 2025 16:27:33 +0000 (11:27 -0500)
The ossl_quic_get_net_write_desired() and
ossl_quic_reactor_net_read_desired() implementations can be used by
listeners. But in that case there is no ctx.qc object present. Instead we
should use the reactor from ctx.obj which will work also for a listener.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25642)

ssl/quic/quic_impl.c

index 825fd4c473741de868e50481473c13b7805fb4e4..3d05acff2bd55977826aaabc4157201a62d04585 100644 (file)
@@ -1380,7 +1380,7 @@ int ossl_quic_get_net_read_desired(SSL *s)
         return 0;
 
     qctx_lock(&ctx);
-    ret = ossl_quic_reactor_net_read_desired(ossl_quic_channel_get_reactor(ctx.qc->ch));
+    ret = ossl_quic_reactor_net_read_desired(ossl_quic_obj_get0_reactor(ctx.obj));
     qctx_unlock(&ctx);
     return ret;
 }
@@ -1396,7 +1396,7 @@ int ossl_quic_get_net_write_desired(SSL *s)
         return 0;
 
     qctx_lock(&ctx);
-    ret = ossl_quic_reactor_net_write_desired(ossl_quic_channel_get_reactor(ctx.qc->ch));
+    ret = ossl_quic_reactor_net_write_desired(ossl_quic_obj_get0_reactor(ctx.obj));
     qctx_unlock(&ctx);
     return ret;
 }