summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugo Landau <hlandau@openssl.org>2024-04-09 08:32:12 +0100
committerHugo Landau <hlandau@openssl.org>2024-04-19 09:33:54 +0100
commit9fe62289b7e18a23ea916d469889f64292836662 (patch)
tree799d339250c38ffe1198fc4f17606fd9dd73f538
parent89b47ad9e3f4b9a4496fcbe03bbff6fd10d14c13 (diff)
QUIC APL: Support SSL_inject_net_dgram for listeners
Reviewed-by: Neil Horman <nhorman@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/24037)
-rw-r--r--ssl/quic/quic_impl.c8
1 files 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;