detect stateless resets for zero-length connection IDs (#5027)

This commit is contained in:
Marten Seemann
2025-04-11 21:23:53 +08:00
committed by GitHub
parent e76621f75a
commit ef2b87f5d5
5 changed files with 95 additions and 28 deletions

View File

@@ -123,6 +123,10 @@ const MinUnknownVersionPacketSize = MinInitialPacketSize
// MinStatelessResetSize is the minimum size of a stateless reset packet that we send
const MinStatelessResetSize = 1 /* first byte */ + 20 /* max. conn ID length */ + 4 /* max. packet number length */ + 1 /* min. payload length */ + 16 /* token */
// MinReceivedStatelessResetSize is the minimum size of a received stateless reset,
// as specified in section 10.3 of RFC 9000.
const MinReceivedStatelessResetSize = 5 + 16
// MinConnectionIDLenInitial is the minimum length of the destination connection ID on an Initial packet.
const MinConnectionIDLenInitial = 8