From 9fe62289b7e18a23ea916d469889f64292836662 Mon Sep 17 00:00:00 2001 From: Hugo Landau Date: Tue, 9 Apr 2024 08:32:12 +0100 Subject: QUIC APL: Support SSL_inject_net_dgram for listeners Reviewed-by: Neil Horman Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/24037) --- ssl/quic/quic_impl.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ssl/quic/quic_impl.c b/ssl/quic/quic_impl.c index f9289b5118..ed1df9e686 100644 --- a/ssl/quic/quic_impl.c +++ b/ssl/quic/quic_impl.c @@ -3111,18 +3111,20 @@ int SSL_inject_net_dgram(SSL *s, const unsigned char *buf, int ret = 0; QCTX ctx; QUIC_DEMUX *demux; + QUIC_PORT *port; - if (!expect_quic_cs(s, &ctx)) + if (!expect_quic_csl(s, &ctx)) return 0; qctx_lock(&ctx); - if (ctx.obj->port == NULL) { + port = ossl_quic_obj_get0_port(ctx.obj); + if (port == NULL) { QUIC_RAISE_NON_NORMAL_ERROR(&ctx, ERR_R_UNSUPPORTED, NULL); goto err; } - demux = ossl_quic_port_get0_demux(ctx.obj->port); + demux = ossl_quic_port_get0_demux(port); ret = ossl_quic_demux_inject(demux, buf, buf_len, peer, local); ret = 1; -- cgit v1.2.3