Skip to content

Calculate the datagram size as the total UDP payload size #2645

Not planned

Description

@LiD0209

Calculate the datagram size as the total UDP payload size, including all QUIC packet headers and protected payloads in that single UDP datagram.

Problem Description

Direct normative probe: Calculate the datagram size as the total UDP payload size, including all QUIC packet headers and protected payloads in that single UDP datagram. (baseline) remains a suspected mismatch: A mismatch remains plausible because the original static evidence is incomplete, configuration-dependent, or aimed at the wrong source path.

This report deduplicates multiple candidate-level test cases that resolved to the same root cause.

Standard Requirement

A UDP datagram can include one or more QUIC packets. The datagram
size refers to the total UDP payload size of a single UDP datagram
carrying QUIC packets. The datagram size includes one or more QUIC
packet headers and protected payloads, but not the UDP or IP headers.

Interpretation:

When When calculating the datagram size of a UDP datagram carrying QUIC packets., Calculate the datagram size as the total UDP payload size, including all QUIC packet headers and protected payloads in that single UDP datagram. Forbidden behavior: Do not include UDP or IP headers in the datagram size.

Relevant Source Code

Strict static review downgraded this record to suspected_issue because the original no_issue proof was under-evidenced.

quiche/src/lib.rs:443

pub const MIN_CLIENT_INITIAL_LEN: usize = 1200;

The QUIC Initial minimum is fixed at 1200 bytes.

quiche/src/lib.rs:915-924

    pub fn set_max_recv_udp_payload_size(&mut self, v: usize) {
        self.local_transport_params.max_udp_payload_size =
            cmp::min(v as u64, octets::MAX_VAR_INT);
    }

    /// Sets the maximum outgoing UDP payload size.
    ///
    /// The default and minimum value is `1200`.
    pub fn set_max_send_udp_payload_size(&mut self, v: usize) {
        self.max_send_udp_payload_size = cmp::max(v, MAX_SEND_UDP_PAYLOAD_SIZE);

Configuration rejects send sizes below the default/minimum send payload size.

quiche/src/lib.rs:4079-4081

        if has_initial && left > 0 && done < MIN_CLIENT_INITIAL_LEN {
            let pad_len = cmp::min(left, MIN_CLIENT_INITIAL_LEN - done);

Initial datagrams are padded up to the 1200-byte minimum when needed.

tokio-quiche/src/socket/capabilities.rs:272-287

    /// Sets [`IP_MTU_DISCOVER`](https://man7.org/linux/man-pages/man7/ip.7.html), to
    /// `IP_PMTUDISC_PROBE`, which disables kernel PMTUD and sets the `DF`
    /// (Don't Fragment) flag.
    pub fn ip_mtu_discover_probe(&mut self) -> io::Result<()> {
        setsockopt(&self.socket.as_fd(), IpMtuDiscoverProbe, &())?;

        self.cap.has_ip_mtu_discover_probe = true;
        Ok(())
    }

    /// Sets [`IPV6_MTU_DISCOVER`](https://man7.org/linux/man-pages/man7/ipv6.7.html), to
    /// `IPV6_PMTUDISC_PROBE`, which disables kernel PMTUD and sets the `DF`
    /// (Don't Fragment) flag.
    pub fn ipv6_mtu_discover_probe(&mut self) -> io::Result<()> {
        setsockopt(&self.socket.as_fd(), Ipv6MtuDiscoverProbe, &())?;

Linux socket capability setup sets PMTU discovery probe mode, documented here as setting DF.

Runtime Evidence

Round 1

  • Status: blocked
  • Positive control: not run in this round.
  • Focused reproducer: not run in this round.

Generated after strict static triage as suspected_issue; focused runtime was not executed in this run because the static evidence remained incomplete, configuration-dependent, or required a bespoke harness beyond the five-round budget.

Inconsistency Reason

  • A mismatch remains plausible because the original static evidence is incomplete, configuration-dependent, or aimed at the wrong source path.

Decision Reason

  • Strict static review found that the generated no_issue record did not prove the specific reachable behavior required by the contract; see static-triage-batches/batch-0001.agent-review.md.

Remaining Uncertainty

  • Focused variants or stronger path-specific evidence are needed before this requirement can be treated as terminal no_issue.

Activity

  1. ghedo commented on Nov 25, 2026

    @ghedo
    Member

    Closing because this report does not identify a concrete mismatch, and its runtime check did not run. quiche measures a datagram's size as the UDP payload it writes in send(), which includes every coalesced QUIC packet and excludes the UDP and IP headers, as RFC 9000 section 14 describes. Please reopen with a specific case where quiche counts the size differently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions