fix(iroh-dns): drop link-local and unspecified system nameservers#4210
Draft
Frando wants to merge 1 commit into
Draft
fix(iroh-dns): drop link-local and unspecified system nameservers#4210Frando wants to merge 1 commit into
Frando wants to merge 1 commit into
Conversation
|
Documentation for this PR has been generated and is available at: https://n0-computer.github.io/iroh/pr/4210/docs/iroh/ Last updated: 2026-04-29T10:40:07Z |
## Description Android tethered through an iPhone publishes link-local nameservers in `LinkProperties.getDnsServers()`. Without a scope ID those are not routable from a connected UDP socket and every query times out before falling back. Generalize the existing `WINDOWS_BAD_SITE_LOCAL_DNS_SERVERS` filter into `is_usable_nameserver`, which also drops link-local IPv4 (`169.254.0.0/16`), link-local IPv6 (`fe80::/10`), and the unspecified addresses. The filter applies on every platform. ## Breaking Changes None. ## Notes & open questions This is a reachability filter, not a trust boundary. Authenticated DNS still requires DNS-over-HTTPS or DNSSEC on top. ## Change checklist - [x] Self-review. - [x] Tests if relevant. - [x] All breaking changes documented.
f36b5de to
c507c1f
Compare
Contributor
|
Ugh, good catch but I don't think filtering out the link-local DNS servers is generally a good idea. Can we not use them correctly? |
Member
Author
I don't know. We just have the report of an Android phone being tether to an Iphone failing to resolve DNS. We'd need to try to replicate this I guess. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
We have reports of Android handing out link-local nameservers in
LinkProperties.getDnsServers()when the device is tethered through an iPhone. Without a scope ID those addresses are not reachable from a connected UDP socket, so every DNS query times out before the public-DNS fallback kicks in.The system-config reader already filters Windows IPv6 site-local anycast (the deprecated
fec0:0:0:ffff::/96range that Windows still configures alongside the loopback adapter). This PR generalizes that into a singleis_usable_nameserverhelper and adds three more drops:fe80::/10)169.254.0.0/16)0.0.0.0,::)The filter applies on every platform; nothing here is Android-specific. The iPhone-tether case was just the one we noticed.
Breaking Changes
None.
Notes & open questions
Change checklist