Skip to content

Commit

Permalink
Check all frames for stateless reset conditions
Browse files Browse the repository at this point in the history
In writing the quic stateless reset test we found that the quic rx code
wasn't checking for stateless reest conditions, as the SRT frames were
getting discarded due to failed lcdim lookups.  Move the SRT check above
the lcdim lookup in the rx path to ensure we handle SRT properly in the
client.

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from #23384)
  • Loading branch information
nhorman committed Jan 31, 2024
1 parent 69055b2 commit d2e7855
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ssl/quic/quic_port.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand All @@ -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
Expand Down

0 comments on commit d2e7855

Please sign in to comment.