Ignore retry packets that arrive too late
authorMatt Caswell <matt@openssl.org>
Tue, 17 Oct 2023 15:26:13 +0000 (16:26 +0100)
committerTomas Mraz <tomas@openssl.org>
Thu, 19 Oct 2023 09:53:07 +0000 (11:53 +0200)
commit56e303259ed48884c914fe24b354e9cc7b7532c3
treedabc76fa636bea8a0f8742480247cbf274f9a6f4
parentfa9e6ad46860ea92aa2e1ba997b20c6dff76b42c
Ignore retry packets that arrive too late

RFC 9000 s 17.2.5.2 says

> After the client has received and processed an Initial or Retry packet
> from the server, it MUST discard any subsequent Retry packets that it
> receives.

We were checking for multiple Retry packets, but not if we had already
processed an Initial packet.

Fixes the assertion failure noted in
https://github.com/openssl/openssl/pull/22368#issuecomment-1765618884

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22411)
ssl/quic/quic_channel.c