Skip to content

fix: fragment CRYPTO flight to honor peer max_udp_payload_size (#2)#3

Merged
mrrubinos merged 1 commit into
mainfrom
fix/handshake-crypto-flight-fragmentation
Jun 3, 2026
Merged

fix: fragment CRYPTO flight to honor peer max_udp_payload_size (#2)#3
mrrubinos merged 1 commit into
mainfrom
fix/handshake-crypto-flight-fragmentation

Conversation

@mrrubinos

Copy link
Copy Markdown
Contributor

Closes #2.

The server packed its entire Handshake CRYPTO flight (~1550 bytes) into one
datagram, exceeding the 1472-byte max_udp_payload_size quiche
advertises. Client dropped it with ERR_MSG_TOO_BIG before decryption and timed
out (quic_error 67); curl/ngtcp2 tolerated it, hiding the bug.

flush_handshake/1 now uses build_handshake_packets/2 to split the flight across
packets, fragmenting CRYPTO at its offset boundary (RFC 9000 §19.6) so no
datagram exceeds min(max_payload_size, peer max_udp_payload_size).

Also advertise only the configured version_preference in the version_information transport param instead of all supported_versions.

…size (#2)

Also advertise only the configured version_preference in the version_information
transport param instead of all supported_versions.
@mrrubinos mrrubinos merged commit 94c284d into main Jun 3, 2026
2 checks passed
@mrrubinos mrrubinos deleted the fix/handshake-crypto-flight-fragmentation branch June 3, 2026 03:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Server emits Handshake CRYPTO flight in one oversized datagram, stalling some clients

2 participants