From: Hugo Landau Date: Tue, 9 Apr 2024 07:32:12 +0000 (+0100) Subject: QUIC APL: Support SSL_inject_net_dgram for listeners X-Git-Tag: openssl-3.5.0-alpha1~402 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=87d474660c5d1d468e09551c94cffa60c8c7c8ee;p=thirdparty%2Fopenssl.git 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) --- diff --git a/ssl/quic/quic_impl.c b/ssl/quic/quic_impl.c index de6b79f2480..0765418d7d1 100644 --- a/ssl/quic/quic_impl.c +++ b/ssl/quic/quic_impl.c @@ -3129,18 +3129,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;