mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-25 03:05:51 +03:00
[GH-ISSUE #2959] Linux configuration without a /etc/resolv.conf is not working #1100
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#1100
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 @stormshield-gt on GitHub (Apr 30, 2025).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/2959
Describe the bug
In my current Linux configuration, I don't have a
/etc/resolv.confwhich makes failed the hickory resolver.The Linux man page said that if this file does not exist, only the name server on the local machine will be queried, so I think my configuration is valid.
To Reproduce
Steps to reproduce the behavior:
You need to have a machine without
/etc/resolv.conf.I get this error :
But if i deactivate hickory DNS, it will work just fine.
Manually adding a
/etc/resolv.confwill solve the problem, but I require tweaking the local DNS configuration, which is not always possible.Expected behavior
I would have expected to work out of the box, even if
/etc/resolv.confdoesn't exist.System:
Version:
Crate: resolver
Version: 0.24.4
@djc commented on GitHub (Apr 30, 2025):
Hmm, I feel like from the point of a resolver library written in Rust it is pretty reasonable to refuse to guess the resolver configuration if it fails to find one in the well-known location. While Linux may document in the manual for the resolver configuration file what behavior the system resolver will use when this file is not present, I feel like that behavior might be surprising (as an expectation from Rust library API) especially on other platforms.
Why do you want to enable the Hickory option in reqwest?
I'm not completely sure what you mean by this.
@stormshield-gt commented on GitHub (Apr 30, 2025):
Thanks for the quick response! I see your point about how this might be surprising.
It's not a choice of mine; it's the testcontainers library I'm using. I precise that
testcontainerslet you tweak therequestconfiguration, so I can useno_hickory_dns()to "fix" the problem.Editing
/etc/resolv.confrequiresrootprivilege, which might not be available to a user in a hardened environment.