Skip to content

Require destination confirmation before reporting a path MTU - #159

Merged
lance0 merged 2 commits into
masterfrom
fix/pmtud-confirmation
Oct 16, 2026
Merged

lance0 merged 2 commits into
masterfrom
fix/pmtud-confirmation

Conversation

@lance0

@lance0 lance0 commented Oct 16, 2026

Copy link
Copy Markdown
Owner

PMTUD could report an MTU without confirming that any packet of that size reached the destination: the first router hint completed discovery immediately, all-timeout searches assumed the protocol minimum worked, and intermediate ICMP errors counted as success. Continue probing after size hints, track a separately confirmed size, require two destination Echo Replies, and leave the result unconfirmed when delivery cannot be demonstrated. Local EMSGSIZE handling follows the same state machine; IPv6 port-unreachable is no longer mistaken for IPv4 fragmentation-needed.

The TUI now shows MTU: unconfirmed for a finished search without a result. JSON adds a defaulted confirmed_size field and preserves old recordings. Documentation explains the configured ceiling, 8-byte tolerance, and conservative behavior under loss/filtering.

Validation: full build/test suite, strict all-target Clippy, formatting, private-item rustdoc, and Rust 1.88 check passed. Regressions exercise successive 1400/1320-byte router limits, IPv4/IPv6 total timeout and local size errors, an explicitly confirmed IPv6 floor, intermediate replies, non-destination Echo Replies, and old JSON. Validation is deterministic; live router/kernel behavior still merits manual testing across supported platforms.

References: RFC 8201 §3 explains repeated reductions for successive bottlenecks; RFC 8899 informs positive probe confirmation. This remains ICMP Echo probing and does not claim full datagram DPLPMTUD compliance.

lance0 and others added 2 commits October 16, 2026 00:07
A reported MTU below the protocol minimum is invalid (RFC 8201 §4), and one
below an already confirmed size contradicts it. Count either as a failed probe
instead of aborting the search, so a bogus hint cannot end PMTUD unconfirmed.
Update the PMTUD algorithm description in ARCHITECTURE.md to match.
@lance0
lance0 marked this pull request as ready for review October 16, 2026 15:44
@lance0
lance0 merged commit 6b387a7 into master Oct 16, 2026
6 checks passed
@lance0
lance0 deleted the fix/pmtud-confirmation branch October 16, 2026 16:13
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.

1 participant