The check rejecting server Initial packets with a non-zero token length
tests pkt->token_len before it is set, so it never matches. Test the
parsed <token_len> value instead, as required by RFC 9000 17.2.2.
This should be backported up to 3.3, where it was introduced by
43d88a44f
("MINOR: quic-be: Datagrams and packet parsing support").
Signed-off-by: William Dauchy <wdauchy@gmail.com>
goto drop;
}
- if (!l && pkt->token_len) {
+ if (!l && token_len) {
/* A server must sent Initial packets with a null token length. */
- TRACE_PROTO("Packet dropped",
+ TRACE_PROTO("RX Initial packet with non-zero token length on backend",
QUIC_EV_CONN_LPKT, NULL, NULL, NULL, pkt->version);
goto drop;
}