QUIC: add support for 0-RTT packets received before the Initial

RFC9001 4.6.1: "A client that wishes to send 0-RTT packets uses the
early_data extension in the ClientHello message of a subsequent handshake;
see Section 4.2.10 of [TLS13]. It then sends application data in 0-RTT
packets."
That means the client sends before the CH (in the Initial) and then the
0-RTT (in the same UDP datagram or not)".

However, because of packet loss or out-of-order delivery, it might
happens that a 0-RTT packet is received before the Initial (the original
one or a retransmission).
For example, Google and Facebook servers save 0-RTT packets for a small
amount of time in hopes of receiving the corresponding Initial.

Update the QUIC dissector to detect 0-RTT packets and keep looking for
the Initial.

Issue found by @utoni in #1706; the trace example has been taken from that
PR.
This commit is contained in:
Nardi Ivan
2022-08-24 15:38:30 +02:00
committed by Toni
parent 0c8bc9f055
commit 8bfb1712d8
4 changed files with 101 additions and 14 deletions
+3
View File
@@ -787,6 +787,9 @@ struct ndpi_flow_udp_struct {
/* NDPI_PROTOCOL_XBOX */
u_int32_t xbox_stage:1;
/* NDPI_PROTOCOL_QUIC */
u_int32_t quic_0rtt_found:1;
/* NDPI_PROTOCOL_SKYPE */
u_int8_t skype_crc[4];