Skip to content

fix: suppress HostUnreachable warnings on UDP transmit (fixes #4345)#4363

Open
Abhijeet1815 wants to merge 1 commit into
n0-computer:mainfrom
Abhijeet1815:fix-ipv6-unreachable-warnings
Open

fix: suppress HostUnreachable warnings on UDP transmit (fixes #4345)#4363
Abhijeet1815 wants to merge 1 commit into
n0-computer:mainfrom
Abhijeet1815:fix-ipv6-unreachable-warnings

Conversation

@Abhijeet1815

Copy link
Copy Markdown

Description

Breaking Changes

Notes & open questions

Change checklist

  • Self-review.
  • Documentation updates following the style guide, if relevant.
  • Tests if relevant.
  • All breaking changes documented.
    • List all breaking changes in the above "Breaking Changes" section.
    • Open an issue or PR on any number0 repos that are affected by this breaking change. Give guidance on how the updates should be handled or do the actual updates themselves. The major ones are:

@n0bot n0bot Bot added this to iroh Jun 18, 2026
@github-project-automation github-project-automation Bot moved this to 🚑 Needs Triage in iroh Jun 18, 2026
@Frando

Frando commented Jun 19, 2026

Copy link
Copy Markdown
Member

Can you add some more details please. When are you getting these errors? Which platform, and under which conditions?

If suppressing these errors is what is wanted on the recv path generally (I'll have to investigate more if that is the case), then this should likely happen in netwatch, similar to n0-computer/net-tools#166

Otherwise yes, it's likely fine to tone down the warnings here. But I'd like to know a bit more before.

@Abhijeet1815

Abhijeet1815 commented Jun 19, 2026

Copy link
Copy Markdown
Author

Description

This PR fixes #4345 by suppressing expected HostUnreachable warnings from noq UDP packet transmits on the send path.

Root Cause & Context:
Since PR #4299 introduced Happy Eyeballs support, iroh resolves both IPv4 and IPv6 addresses for the Relay URL and simultaneously probes them.

On hosts that have an IPv6 interface (e.g., link-local addresses, which makes if_state.have_v6 evaluate to true) but lack an actual IPv6 internet route, the QADv6 (QUIC address discovery) probe is still triggered. When noq attempts to send a UDP packet to the Relay's IPv6 address via netwatch::UdpSender, the OS (sendmsg) naturally rejects it with Os { code: 65, kind: HostUnreachable, message: "No route to host" }.

The Fix:
Previously, the underlying poll_send logic in iroh/src/socket/transports.rs would log a WARN for every packet dropped this way, resulting in spurious log spam.

Because HostUnreachable is a perfectly expected outcome on the send path when Happy Eyeballs probes partially connected network topologies, this PR downgrades HostUnreachable, NetworkUnreachable, and NetworkDown errors during packet transmission to trace! level. This gracefully drops the packets without polluting the user logs, while preserving visibility for developers debugging at a granular level.

Breaking Changes

None.

Notes & open questions

  • HostUnreachable, NetworkUnreachable, and NetworkDown are explicitly handled as expected behaviors on isolated/local networks trying to dial out to the internet, and are now only traced.

Change checklist

  • Self-review
  • Documentation updates following the style guide, if relevant.
  • Tests if relevant.
  • All breaking changes documented.
    • List all breaking changes in the above "Breaking Changes" section.
    • Open an issue or PR on any number0 repos that are affected by this breaking change. Give guidance on how the updates should be handled or do the actual updates themselves. The major ones are:

@flub flub left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The warn log should not exist at all to be fair. Let's not do any special casing here and move the entire log to trace.

noq-udp already does appropriate logging for these.

Also, please update the description of the PR explaining the reasoning and closing the issue. This is what gets turned into the commit message. If you can not do this we'll have to close this PR.

@github-project-automation github-project-automation Bot moved this from 🚑 Needs Triage to 🏗 In progress in iroh Jun 22, 2026
@flub flub mentioned this pull request Jun 29, 2026
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🏗 In progress

Development

Successfully merging this pull request may close these issues.

3 participants