Skip to content

fix: h3 datagrams must not be sent until both sides agree on it - #341

Open
JPDye wants to merge 3 commits into
hyperium:masterfrom
JPDye:h3-datagram-gate
Open

fix: h3 datagrams must not be sent until both sides agree on it#341
JPDye wants to merge 3 commits into
hyperium:masterfrom
JPDye:h3-datagram-gate

Conversation

@JPDye

@JPDye JPDye commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

https://www.rfc-editor.org/rfc/rfc9297#section-2.1.1:
QUIC DATAGRAM frames MUST NOT be sent until the SETTINGS_H3_DATAGRAM setting has been both sent and received with a value of 1.

Changed the SharedState so that enable_datagram represents the negotiated SETTINGS_H3_DATAGRAM (an AND of ours and the remotes).

Also fixed some broken duvet comments and added duvet tracking of h3-datagram and the associated RFC.

@JPDye
JPDye force-pushed the h3-datagram-gate branch from 5187eb8 to 4dbc1b1 Compare June 11, 2026 17:13
@vcarus

vcarus commented Aug 20, 2026

Copy link
Copy Markdown

Two of the RFC 9297 §2.1.1 lines this PR adds to the duvet snapshot ("The value of the SETTINGS_H3_DATAGRAM setting MUST be either 0 or 1" and "... MUST terminate the connection with error H3_SETTINGS_ERROR") are cheap to implement while you are here: Settings::decode in h3/src/proto/frame.rs never looks at a setting's value, and SettingsError::InvalidSettingValue(SettingId, u64) is already defined with a Display impl but is never constructed anywhere in the crate. A check for SettingId::H3_DATAGRAM with a value other than 0 or 1 returning that variant would let both citations be marked as implemented instead of registered.

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.

2 participants