Skip to content

Commit

Permalink
QUIC APL: Support SSL_inject_net_dgram for listeners
Browse files Browse the repository at this point in the history
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from #24037)
  • Loading branch information
hlandau committed Apr 11, 2024
1 parent 1877a8f commit 73bd489
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions ssl/quic/quic_impl.c
Original file line number Diff line number Diff line change
Expand Up @@ -3110,18 +3110,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;
Expand Down

0 comments on commit 73bd489

Please sign in to comment.