mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-25 03:05:51 +03:00
[GH-ISSUE #854] Handle IPv6 addresses containing scope IDs #549
Labels
No labels
blocked
breaking-change
bug
bug:critical
bug:tests
cleanup
compliance
compliance
compliance
crate:all
crate:client
crate:native-tls
crate:proto
crate:recursor
crate:resolver
crate:resolver
crate:rustls
crate:server
crate:util
dependencies
docs
duplicate
easy
easy
enhance
enhance
enhance
feature:dns-over-https
feature:dns-over-quic
feature:dns-over-tls
feature:dnsssec
feature:global_lb
feature:mdns
feature:tsig
features:edns
has workaround
ops
perf
platform:WASM
platform:android
platform:fuchsia
platform:linux
platform:macos
platform:windows
pull-request
question
test
tools
tools
trust
unclear
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hickory-dns#549
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @davechallis on GitHub (Aug 21, 2019).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/854
Is your feature request related to a problem? Please describe.
I often seen warnings from trust DNS when reading IPv6 hosts file entries containing scope IDs.
E.g. my hosts file contains the following v6 entry:
which causes triggers the following warning from trust dns:
I don't know much about them (https://superuser.com/a/99753 contains some info), but would be nice if they could be parsed without warnings.
@bluejekyll commented on GitHub (Aug 21, 2019):
Is this a windows machine?
We rely on the internal ipv4 and ipv6 parsers in Rust for this. I think the easiest thing todo would be to first parse for the % and then strip the identifier. In the long run, it would be good to incorporate this into routing information for ipv6 upstream resolvers.
@davechallis commented on GitHub (Aug 21, 2019):
This was on Mac OS X - it was an autogenerated entry from something as far as I could see.
@jbg commented on GitHub (Feb 13, 2026):
These now seem to parse correctly (resolv-conf has
ScopedIpwhich preserves the scope) , but the scope is silently discarded here in hickory-resolver (v0.25.2 / main), resulting in failure to resolve.@jbg commented on GitHub (Feb 13, 2026):
I'd be happy to do the work to fix this but there are several public types which encode the lack of scope information, including
NameServerConfigandConnectionProvider, so there would be breaking changes. I think two reasonable approaches would be to changeIpAddrtoSocketAddrwith port unused/0, or to useScopedIpfrom resolv-conf (or a type in this crate with the same shape) to represent "IpAddrplus possible scope".@djc commented on GitHub (Feb 13, 2026):
mainhas already broken compatibility, so that's not a blocker. Happy to review a PR in this direction!