[PR #1562] [MERGED] Only switch to TCP for a DNS query if response was truncated (configurable with an option) #2418

Closed
opened 2026-03-16 08:52:44 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hickory-dns/hickory-dns/pull/1562
Author: @peterthejohnston
Created: 10/6/2021
Status: Merged
Merged: 10/8/2021
Merged by: @bluejekyll

Base: mainHead: main


📝 Commits (2)

  • fa32c91 Default to only switch to TCP if response was truncated
  • 82ba817 Merge branch 'main' into main

📊 Changes

6 files changed (+84 additions, -27 deletions)

View changed files

📝 crates/resolver/src/async_resolver.rs (+1 -0)
📝 crates/resolver/src/config.rs (+3 -0)
📝 crates/resolver/src/https.rs (+9 -3)
📝 crates/resolver/src/name_server/name_server_pool.rs (+14 -10)
📝 crates/resolver/src/tls/mod.rs (+9 -3)
📝 tests/integration-tests/tests/name_server_pool_tests.rs (+48 -11)

📄 Description

Currently, if queries to name servers over UDP result in either a
truncated response, or any kind of error, the query will be retried over
TCP. It should be possible to only use TCP for the case of oversized
messages, and avoid it in the common case. This change makes this the
default behavior and adds an option to ResolverOpts that can be enabled
to get the current behavior.

Fixes #1561


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hickory-dns/hickory-dns/pull/1562 **Author:** [@peterthejohnston](https://github.com/peterthejohnston) **Created:** 10/6/2021 **Status:** ✅ Merged **Merged:** 10/8/2021 **Merged by:** [@bluejekyll](https://github.com/bluejekyll) **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (2) - [`fa32c91`](https://github.com/hickory-dns/hickory-dns/commit/fa32c91ea1e82fe7dd589106465f55a646a71b31) Default to only switch to TCP if response was truncated - [`82ba817`](https://github.com/hickory-dns/hickory-dns/commit/82ba8171a9672a3b5159accefd2606eff5968b22) Merge branch 'main' into main ### 📊 Changes **6 files changed** (+84 additions, -27 deletions) <details> <summary>View changed files</summary> 📝 `crates/resolver/src/async_resolver.rs` (+1 -0) 📝 `crates/resolver/src/config.rs` (+3 -0) 📝 `crates/resolver/src/https.rs` (+9 -3) 📝 `crates/resolver/src/name_server/name_server_pool.rs` (+14 -10) 📝 `crates/resolver/src/tls/mod.rs` (+9 -3) 📝 `tests/integration-tests/tests/name_server_pool_tests.rs` (+48 -11) </details> ### 📄 Description Currently, if queries to name servers over UDP result in either a truncated response, or any kind of error, the query will be retried over TCP. It should be possible to only use TCP for the case of oversized messages, and avoid it in the common case. This change makes this the default behavior and adds an option to ResolverOpts that can be enabled to get the current behavior. Fixes #1561 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-16 08:52:44 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hickory-dns#2418
No description provided.