[PR #3111] [CLOSED] Cleanup: Add clear_system_defaults method to reset resolver domain and search paths (Fixes #1899) #3569

Closed
opened 2026-03-16 11:50:42 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hickory-dns/hickory-dns/pull/3111
Author: @StevenEck
Created: 7/12/2025
Status: Closed

Base: mainHead: cleanup/clear-default-domain-1899


📝 Commits (2)

  • b105bc3 Add clear_system_defaults to ResolverConfig for clearing domain and search paths
  • 62e91ad Add unit test for system search domain handling (fixes #1899)

📊 Changes

1 file changed (+33 additions, -0 deletions)

View changed files

📝 crates/resolver/src/config.rs (+33 -0)

📄 Description

Introduces a new method, clear_system_defaults, to the resolver configuration struct. The method resets the resolver’s domain to the root (.) and clears all search domains. This enables library users to programmatically remove inherited system search/domain paths, preventing unintended DNS suffix expansion (such as those described in #1899).


🔄 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/3111 **Author:** [@StevenEck](https://github.com/StevenEck) **Created:** 7/12/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `cleanup/clear-default-domain-1899` --- ### 📝 Commits (2) - [`b105bc3`](https://github.com/hickory-dns/hickory-dns/commit/b105bc3a3e4299436360101c502a608d50c9fdcb) Add clear_system_defaults to ResolverConfig for clearing domain and search paths - [`62e91ad`](https://github.com/hickory-dns/hickory-dns/commit/62e91ad56ba87d5b814715cdc8da08caa1137e91) Add unit test for system search domain handling (fixes #1899) ### 📊 Changes **1 file changed** (+33 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `crates/resolver/src/config.rs` (+33 -0) </details> ### 📄 Description Introduces a new method, clear_system_defaults, to the resolver configuration struct. The method resets the resolver’s domain to the root (.) and clears all search domains. This enables library users to programmatically remove inherited system search/domain paths, preventing unintended DNS suffix expansion (such as those described in [#1899](https://github.com/hickory-dns/hickory-dns/issues/1899)). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-16 11:50:42 +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#3569
No description provided.