]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
QUIC APL: Support SSL_inject_net_dgram for listeners
authorHugo Landau <hlandau@openssl.org>
Tue, 9 Apr 2024 07:32:12 +0000 (08:32 +0100)
committerNeil Horman <nhorman@openssl.org>
Mon, 17 Feb 2025 16:27:32 +0000 (11:27 -0500)
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/24037)

ssl/quic/quic_impl.c

index de6b79f2480ec52eda0447d09ab2494e441b6509..0765418d7d1e17e9d1cc1ce2bcefa42ef9b7a9ea 100644 (file)
@@ -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;