mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-25 03:05:51 +03:00
[PR #1556] [MERGED] correct behavior around trust_nx_responses #2411
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#2411
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/1556
Author: @peterthejohnston
Created: 9/22/2021
Status: ✅ Merged
Merged: 9/23/2021
Merged by: @djc
Base:
main← Head:main📝 Commits (1)
6d7df2fCorrect behavior around trust_nx_responses📊 Changes
3 files changed (+43 additions, -88 deletions)
View changed files
📝
crates/resolver/src/name_server/name_server.rs(+3 -9)📝
tests/integration-tests/src/mock_client.rs(+4 -2)📝
tests/integration-tests/tests/name_server_pool_tests.rs(+36 -77)📄 Description
In this change which moved the
trust_nx_responsesconfig from a configuration on the Resolver to a configuration at the name server level, the option was also renamed fromdistrust_nx_responses. There were some places in the codebase where the corresponding boolean value was not also flipped, unintentionally changing the semantics. This has led to some confusing behavior. For example, in this name_server_pool_test, wheredistrust_nx_responseswas previously set tofalse,trust_nx_responseswas left asfalsein the change, where it should have been changed totrue.This PR fixes a bug where retry behavior doesn't occur unless
trust_nx_responsesis set to true (due to an error response not being considered aResolveError), and reworks the tests to accurately test the current behavior. It also consolidates thetest_distrust_nx_responsesandtest_retry_on_error_responsetests into one test, as they exercised the same functionality.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.