From: Matt Caswell Date: Wed, 9 Oct 2024 10:31:46 +0000 (+0100) Subject: Use the reactor from ctx.obj for net read/write desired implementations X-Git-Tag: openssl-3.5.0-alpha1~353 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=76af88a6218f6f4ed23cc38bcbc6a723fa74816c;p=thirdparty%2Fopenssl.git Use the reactor from ctx.obj for net read/write desired implementations 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 Reviewed-by: Saša Nedvědický (Merged from https://github.com/openssl/openssl/pull/25642) --- diff --git a/ssl/quic/quic_impl.c b/ssl/quic/quic_impl.c index 825fd4c4737..3d05acff2bd 100644 --- a/ssl/quic/quic_impl.c +++ b/ssl/quic/quic_impl.c @@ -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; }