mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-25 03:05:51 +03:00
[GH-ISSUE #2192] hickory-dns responds to dig A doesnotexist.fqdn.com. with NOERROR instead of with NXDOMAIN #915
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#915
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 @japaric on GitHub (Apr 23, 2024).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/2192
Describe the bug
What the title says
To Reproduce
nsd 4.6.1for all the nameservers)hickory-dnsas a resolver with root hint set toprimary2.nameservers.com.(which has the. SOArecord)NOTE:
hickory-dnswas built with therecursorfeature enabled/etc.named.toml/etc/root.hintsdig A doesnotexist.nameservers.com.tohickory-dnsExpected behavior
I don't know if the RFCs leave this scenario unspecified but both BIND (
named) andunboundreturn NXDOMAIN.named`dig` output
unbound`dig` output
System:
rust:1-slim-bookworm(Docker image)Version:
Crate:
hickory-dnsVersion:
6334a014Additional context
A test version of these repro steps can be found in the dnssec-tests repo
This might be related to #2099 but in this case there are no CNAMEs or wildcards
EDIT1: noted which Cargo features were enabled
EDIT2: remove
_cache_sizeoptions fromnamed.tomlsince they are optional settingsEDIT3: clarify that the linux distribution is Debian
@bluejekyll commented on GitHub (May 4, 2024):
There's an interesting case where it's NXDOMAIN if there are no other records at that name, but if there are any, then it's supposed to be NOERROR and no record to indicate other records besides the one queried do exist at that name.
using CLI resolver from our library, I'm getting an A record at that name:
Maybe this was changed after your test?
@japaric commented on GitHub (May 7, 2024):
that's because that CLI resolver has internet access and access to the public DNS network. I guess something similar if I run
dig @1.1.1.1 A doesnotexist.nameservers.com(note the public DNS resolver1.1.1.1)In contrast to that, all the nodes in the test are in a private, local network with no internet access so they never contact root servers like
a.root-servers.net. the name servers in the tests do not contain adoesnotexist.nameservers.comA record; nor wildcard records that would match theA doesnotexist.nameservers.comquery@bluejekyll commented on GitHub (May 18, 2024):
Got it. For what it's worth, DNS has this reserved the
.test.TLD for testing use cases, which can be better to use as it ensures that no requests ever go to the internet for the TLD. It might (depends on what is being tested I guess) a good idea to generally use that.@bluejekyll commented on GitHub (May 18, 2024):
rereading this, it does look like this should be an NXDOMAIN. I have been wanting to setup some test cases in the hickory repo itself for tests like this so that we can more easily guarantee behavior. I'm trying to figure out why we would end up with a NOERROR in this case, definitely seems like it should be NXDOMAIN. It looks like there's a bit of a recursive set of references here... I wonder if that got triggered by looping? I'd have to recreate this test case.
@japaric commented on GitHub (May 22, 2024):
this sounded like a good idea but
unboundseems to be hard-coded to answer queries of the formA sub.domain.test.withwhich breaks existing conformance tests in dns-tests when I try to move from
com.domains totest.. RFC6761 lets caching DNS servers special-case queries abouttest.domains, namely:Maybe I can use
dns-test.as the TLD in the conformance tests 🤔 I don't think it'll ever be a real TLD 🤞@bluejekyll commented on GitHub (May 22, 2024):
yeah, I was just calling it out as a concern. I'm not sure how I handle
.testin hickory at the moment. It's probably not worth changing it.@marcus0x62 commented on GitHub (Oct 20, 2024):
This is fixed with #2502.