mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-25 03:05:51 +03:00
[PR #3372] [MERGED] Cache negative responses in the ResponseCache #3786
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#3786
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?
📋 Pull Request Information
Original PR: https://github.com/hickory-dns/hickory-dns/pull/3372
Author: @marcus0x62
Created: 12/3/2025
Status: ✅ Merged
Merged: 12/15/2025
Merged by: @marcus0x62
Base:
main← Head:recursor-cache-negative-responses📝 Commits (4)
4012071proto: add decrement_ttl function to Record2d12bc7test-support: cache queries for inspection by callersfd06306resolver: update NoRecords TTLs in negative ResponseCache4520360resolver: cache nxdomain responses in recursor📊 Changes
5 files changed (+271 additions, -10 deletions)
View changed files
📝
crates/proto/src/rr/resource.rs(+7 -0)📝
crates/resolver/src/cache.rs(+150 -4)📝
crates/resolver/src/recursor/handle.rs(+4 -3)📝
crates/resolver/src/recursor/tests.rs(+62 -0)📝
tests/test-support/src/lib.rs(+48 -3)📄 Description
This adds support for caching negative responses for no data and nxdomain responses in the recursor ResponseCache. Note that it does not implement caching for SERVFAIL responses (we'll have to index by server IP in the cache for those -- RFC 2308 7.1)
@divergentdave in #2595 you added this comment:
I don't we have to worry about using an NSEC record from the child zone -- the RecursorDnsHandle will only send requests for DS records to the parent of the name being queried:
so the NSEC RR used to validate a non-existent DS record should come from that query to the name servers for the parent zone. Our zone cut detection needs improvement in general, and certainly in the case of DS records -- the parent name might not be the delegation point -- but that feels like a change unrelated to #2595. Let me know your thoughts.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.