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 <tomas@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25642)
This commit is contained in:
Matt Caswell 2024-10-09 11:31:46 +01:00 committed by Neil Horman
parent 034fa85ced
commit 76af88a621
1 changed files with 2 additions and 2 deletions

View 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;
}