Skip to content

iface: act on ICMP destination-unreachable hard errors for TCP - #1200

Open
sigvartmh wants to merge 2 commits into
smoltcp-rs:mainfrom
sigvartmh:fix/icmp-fixmes
Open

iface: act on ICMP destination-unreachable hard errors for TCP #1200
sigvartmh wants to merge 2 commits into
smoltcp-rs:mainfrom
sigvartmh:fix/icmp-fixmes

Conversation

@sigvartmh

Copy link
Copy Markdown
Contributor

process_icmpv4 and process_icmpv6 parse Destination Unreachable in
full, including the transport header quoted inside it, and then drop the
result at. A connect() to a host that explicitly refuses therefore
waits out the whole retransmission budget instead of failing when the
refusal arrives.

Per RFC 1122 §4.2.3.9 and RFC 5461 §4 only hard errors act. Transient
codes are ignored, FragRequired stays a soft error.

Path MTU Discovery remains unimplemented: it needs a per-destination MTU
cache that does not exist in the stack.

Left a FIXME for the remaining unhandled errors.

@codecov

codecov Bot commented Aug 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.75%. Comparing base (f878f18) to head (a9b0e68).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1200      +/-   ##
==========================================
+ Coverage   82.57%   82.75%   +0.17%     
==========================================
  Files          83       83              
  Lines       26174    26250      +76     
==========================================
+ Hits        21613    21722     +109     
+ Misses       4561     4528      -33     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Add tests to confirm that we don't adhere to RFC 1122 §4.2.3.9 and
RFC 5461 §4.
`process_icmpv4` and `process_icmpv6` parse Destination Unreachable in
full, including the transport header quoted inside it, and then drop the
result at. A `connect()` to a host that explicitly refuses therefore
waits out the whole retransmission budget instead of failing when the
refusal arrives.

Per RFC 1122 §4.2.3.9 and RFC 5461 §4 only hard errors act. Transient
codes are ignored, `FragRequired` stays a soft error.

Path MTU Discovery remains unimplemented: it needs a per-destination MTU
cache that does not exist in the stack.

Left a `FIXME` for the remaining unhandled errors.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant