mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-25 11:15:54 +03:00
[PR #2196] [MERGED] recursor: respect DO bit in incoming queries #2872
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#2872
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/2196
Author: @japaric
Created: 4/25/2024
Status: ✅ Merged
Merged: 5/11/2024
Merged by: @bluejekyll
Base:
main← Head:ja-recursor-respects-do📝 Commits (5)
3b3f330recursor: set DO in outgoing queries7f24fcbrecursor: preserve DNSSEC records48a2531recursor: honor DO bit in client's query93bb8b6make Recursor configurable via a "builder"0ede6a5expose security-aware setting in named.toml📊 Changes
9 files changed (+185 additions, -45 deletions)
View changed files
📝
crates/proto/src/xfer/dns_handle.rs(+2 -1)📝
crates/proto/src/xfer/dns_request.rs(+3 -0)📝
crates/recursor/src/lib.rs(+5 -1)📝
crates/recursor/src/recursor.rs(+153 -34)📝
crates/recursor/src/recursor_pool.rs(+2 -2)📝
crates/server/Cargo.toml(+1 -1)📝
crates/server/src/store/recursor/authority.rs(+11 -4)📝
crates/server/src/store/recursor/config.rs(+6 -0)📝
util/src/bin/recurse.rs(+2 -2)📄 Description
At the moment this implements the first half of RFC 4035, section 3.2.1: the DO bit is set in the queries the recursive resolver sends on behalf of the client. On the wire, I can see that the name servers it communicates with include extra DNSSEC records in their response to the resolver. However, the
Recursorremoves those extra DNSSEC records before answering the client. That stripping of DNSSEC records does the opposite of the second half of what the RFC dictates (when the DO bit is set).AFAICT, the stripping of those DNSSEC records happens here. That function caches all the received records but only responds with the ones that exactly match the query and as DNSSEC records like RRSIG were not included in the original query it discards them.
I still have to figure out how to best avoid stripping so I'm leaving this as a draft PR for now.
P.S. I'm checking conformance with the tests in https://github.com/ferrous-systems/dnssec-tests/pull/53
cc #2193
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.