diff --git a/ssl/quic/quic_port.c b/ssl/quic/quic_port.c index 46ca22cc3b..0de384de45 100644 --- a/ssl/quic/quic_port.c +++ b/ssl/quic/quic_port.c @@ -499,6 +499,9 @@ static void port_default_packet_handler(QUIC_URXE *e, void *arg, if (!ossl_quic_port_is_running(port)) goto undesirable; + if (port_try_handle_stateless_reset(port, e)) + goto undesirable; + if (dcid != NULL && ossl_quic_lcidm_lookup(port->lcidm, dcid, NULL, (void **)&ch)) { @@ -507,9 +510,6 @@ static void port_default_packet_handler(QUIC_URXE *e, void *arg, return; } - if (port_try_handle_stateless_reset(port, e)) - goto undesirable; - /* * If we have an incoming packet which doesn't match any existing connection * we assume this is an attempt to make a new connection. Currently we