mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-25 03:05:51 +03:00
[GH-ISSUE #300] change default LookupIpStrategy from Ipv4AndIpv6 to Ipv4thenIpv6? #434
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#434
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 @cssivision on GitHub (Nov 26, 2017).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/300
ipv6 is not well supported now,
Ipv4AndIpv6Query for A and AAAA in parallel, the situation is that if the website you visited support ipv6, but your network do not support ipv6, you will get aNetwork Unreachableerror.@bluejekyll commented on GitHub (Nov 26, 2017):
Can you describe your toolchain as your using it? That is, is this something that you could override locally? There are a few options for that.
The reason I picked
IPv4AndIPv6as the default was to make sure that there wasn't a hit in lookup speed forIPv4ThenIpv6. I'm open to this, but would love additional input from other users.@cssivision commented on GitHub (Nov 26, 2017):
i use default config by function
from_system_conf, and my network only support ipv4, when i query dns forwww.google.comsometimes it return ipv6 address, and my application failed.the
optionsfield ofResolverFuturestruct is notpub, and there is no way for me to change thisip_strategyif i want to use system default config.@cssivision commented on GitHub (Nov 26, 2017):
maybe we can make this
optionsfieldpub?@bluejekyll commented on GitHub (Nov 26, 2017):
I'd prefer not making that field
pubI honestly don't know what would happen if you change the config after initialization, and don't know if I want to be restricted by that if we do allow it.Based on your use case, I wonder if we should change this default, possibly by platform. What system are you on? I do think this this matches the way glibc performs lookups on linux, from the resolv.conf man pages:
Example to override system conf:
@cssivision commented on GitHub (Nov 26, 2017):
according to
RFC 6724it seems that we should respect the order provided by getaddrinfo(3). It is already configured to use IPv6 first if both sides have native IPv6, but use IPv4 first if both sides are tunnelling. See RFC 6724 (the new version of RFC 3484), which is implemented in most libc.@bluejekyll commented on GitHub (Nov 26, 2017):
https://tools.ietf.org/html/rfc6724 has a lot of details that are still unimplemented by the Resolver...
Maybe we should open a separate issue, or rename this one, to instead be an enhancement to properly implement that RFC? It will take some work, as I don't think the Resolver currently supports options around a lot of the features being dictated in that yet.
@cssivision commented on GitHub (Nov 26, 2017):
currently, resolver picks IPv4/IPv6 at random, i think we should have a determined operations, otherwise the users can't make up its mind.
now, i write code below to fix the problems.
in my opinion, before this problem is solved, make
Ipv4thenIpv6as a defaultLookupIpStrategyis a good solution.@bluejekyll commented on GitHub (Nov 26, 2017):
fair enough. Would you want to submit a PR?
@cssivision commented on GitHub (Nov 26, 2017):
yes
@bluejekyll commented on GitHub (Nov 28, 2017):
Fixed in #301