mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-25 11:15:54 +03:00
[PR #2160] [MERGED] Trivariant LookupControlFlow type to allow authorities to decline to respond to a query #2849
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#2849
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/2160
Author: @marcus0x62
Created: 2/29/2024
Status: ✅ Merged
Merged: 8/23/2024
Merged by: @marcus0x62
Base:
main← Head:selective_authority📝 Commits (10+)
07f2117Allow authorities to decline to respond to a query by returning None.1e959dfLookupResult tri-variant enum and associated call site changesfdd83bdChange Lookup::Bypass to Lookup::Skip, add map_dyn method to LookupResult, change map(|l| Box::new ... calls to use map_dyn()4ceeacaMerge branch 'main' into selective_authority92b0da8Merge branch 'main' into selective_authorityc6fe59cresolve conflicts with upstreame06b420Merge branch 'main' into selective_authority2b33238Merge remote-tracking branch 'upstream/main' into selective_authorityc6d3fc6This commit reworks LookupResult into LookupControlFlow, as discussed in PR 2160332d338Merge remote-tracking branch 'upstream/main' into selective_authority📊 Changes
11 files changed (+412 additions, -134 deletions)
View changed files
📝
crates/server/src/authority/authority.rs(+174 -7)📝
crates/server/src/authority/authority_object.rs(+15 -16)📝
crates/server/src/authority/catalog.rs(+112 -35)📝
crates/server/src/authority/error.rs(+0 -3)📝
crates/server/src/authority/mod.rs(+2 -2)📝
crates/server/src/server/request_handler.rs(+1 -1)📝
crates/server/src/store/file/authority.rs(+9 -7)📝
crates/server/src/store/forwarder/authority.rs(+12 -8)📝
crates/server/src/store/in_memory/authority.rs(+59 -38)📝
crates/server/src/store/recursor/authority.rs(+17 -11)📝
crates/server/src/store/sqlite/authority.rs(+11 -6)📄 Description
This PR contains changes to the lookup, search, and related authority functions that wrap the lookup in an Option. This is to allow authorities to use None to signal when a lookup was not found, but that searching should continue using other authorities configured in an authority chain.
The current use case is for the block list authority.
This also changes the lookup and build_response logic in catalog.rs to not call send_authoritative_response or send_forwarded_response if None is returned.
The use case for this is so that when an authority like the block list is consulted, we do not leak the request to other authorities for requests the user wants to block, and we do not incur extra latency by waiting for a timeout when the block list can immediately signal it does not have an answer for a particular query.
See discussion here and more generally in PR #2113
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.