mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-25 03:05:51 +03:00
[PR #2953] [MERGED] Send error responses in two more cases #3445
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#3445
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/2953
Author: @divergentdave
Created: 4/28/2025
Status: ✅ Merged
Merged: 4/30/2025
Merged by: @djc
Base:
main← Head:david/server-more-error-responses📝 Commits (5)
7de2811Use Queries in response handlers3566efcCopy queries to error responsesacd4d87Send REFUSED response to disallowed clientsd2836daSend SERVFAIL when response encoding failsc0f83e5Use structured logging📊 Changes
7 files changed (+106 additions, -36 deletions)
View changed files
📝
bin/tests/integration/server_harness/mod.rs(+7 -9)📝
crates/server/src/authority/message_request.rs(+5 -0)📝
crates/server/src/server/h2_handler.rs(+12 -5)📝
crates/server/src/server/h3_handler.rs(+11 -3)📝
crates/server/src/server/mod.rs(+28 -7)📝
crates/server/src/server/quic_handler.rs(+12 -5)📝
crates/server/src/server/response_handler.rs(+31 -7)📄 Description
This sends a REFUSED response to clients that are not allowed to make requests, and sends a SERVFAIL response if response encoding otherwise fails for any reason. With these changes, the server will send some reply to requests in almost all cases (except for extreme edge cases like requests that don't even contain a full header). The relevant code path runs through
handle_request(),<MessageRequest as BinDecodable>::read(),<Catalog as RequestHandler>::handle_request(), various implementations ofResponseHandler, etc. This closes #2572.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.