mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-25 11:15:54 +03:00
[PR #3344] [MERGED] Zone cut identification in the recursor #3761
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#3761
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/3344
Author: @marcus0x62
Created: 11/9/2025
Status: ✅ Merged
Merged: 11/11/2025
Merged by: @marcus0x62
Base:
main← Head:zone-cut-identification📝 Commits (4)
bb23ef1recursor: identify and return zone cut to caller0594408conformance: update conformance tests for zone cut changes48e9e68recursor: make ns_pool_for_zone less recursive8636129recursor: unit tests for ns_pool_for_name changes📊 Changes
6 files changed (+337 additions, -183 deletions)
View changed files
📝
conformance/e2e-tests/src/recursor/delegation/scenarios.rs(+4 -4)📝
conformance/e2e-tests/src/recursor/rfc9539/scenarios.rs(+6 -17)📝
crates/recursor/src/recursor_dns_handle.rs(+181 -160)📝
crates/recursor/src/tests.rs(+130 -1)📝
crates/resolver/src/name_server_pool.rs(+14 -1)📝
tests/test-support/src/lib.rs(+2 -0)📄 Description
This changes ns_pool_for_zone (changed to ns_pool_for_name to better reflect what it does) to associate an accurate zone name with each nameserverpool it creates and make that information accessible to the caller.
Previously, if you searched for a.b.c.example.com, ns_pool_for_zone would identify the name servers for that name, but not tell the caller (resolve) if it last found NS delegations, for example, at example.com. Resolve would operate on the assumption that the zone for a.b.c.example.com was a.b.c.example.com.
For most queries, this isn't a practical problem, but while working on #2882, I found the recursor sometimes discarded NSEC wildcard records (failing bailiwick filter checks) needed to properly validate responses.
This also removes some of the recursion from ns_pool_for_name by creating a list of zones to resolve and iterating over that list rather than calling itself recursively.
@cpu - I had to update a couple of opportunistic encryption tests that were expecting to see NS queries to the root zone, which we shouldn't be sending (we have the root hints cached and use those for NS queries for .) That didn't seem to be really important for the test, but if you need to see NS queries for whatever reason, I think we'll need to use a subdomain in those tests.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.