[PR #2839] [MERGED] resolver: store rooted names in Hosts map #3357

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

📋 Pull Request Information

Original PR: https://github.com/hickory-dns/hickory-dns/pull/2839
Author: @djc
Created: 3/10/2025
Status: Merged
Merged: 3/12/2025
Merged by: @djc

Base: mainHead: hosts


📝 Commits (10+)

  • 77c5aad resolver: rename Hosts::new() to from_system()
  • 7dff170 resolver: remove Option wrapper around Hosts
  • 09e37ab resolver: move inherent impl before other impls
  • 0b55f22 resolver: store rooted names in Hosts map
  • 0ad0303 resolver: simplify hosts file parser
  • f87921e resolver: reduce rightward drift in hosts file parser
  • 857a199 resolver: move read_hosts() to Hosts::from_file()
  • cf0ab7d resolver: externalize I/O errors from hosts file parsing
  • da4b7d6 resolver: reduce rightward drift in LookupIpFuture impl
  • aeef6af resolver: change CachingClient::lookup() to take &self

📊 Changes

5 files changed (+367 additions, -460 deletions)

View changed files

📝 crates/resolver/src/caching_client.rs (+4 -4)
📝 crates/resolver/src/hosts.rs (+71 -56)
📝 crates/resolver/src/lookup_ip.rs (+271 -385)
📝 crates/resolver/src/resolver.rs (+18 -12)
📝 tests/integration-tests/tests/integration/lookup_tests.rs (+3 -3)

📄 Description

Fixes #2836. Regression from #2560.

Assorted refactoring of the surrounding code included.


🔄 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/2839 **Author:** [@djc](https://github.com/djc) **Created:** 3/10/2025 **Status:** ✅ Merged **Merged:** 3/12/2025 **Merged by:** [@djc](https://github.com/djc) **Base:** `main` ← **Head:** `hosts` --- ### 📝 Commits (10+) - [`77c5aad`](https://github.com/hickory-dns/hickory-dns/commit/77c5aad5768d19fff66dd68f76d06297ace223ad) resolver: rename Hosts::new() to from_system() - [`7dff170`](https://github.com/hickory-dns/hickory-dns/commit/7dff17011f9300b87d23a004b7d80793b049f641) resolver: remove Option wrapper around Hosts - [`09e37ab`](https://github.com/hickory-dns/hickory-dns/commit/09e37abbc9340dbaa33e727de6fb41524018216d) resolver: move inherent impl before other impls - [`0b55f22`](https://github.com/hickory-dns/hickory-dns/commit/0b55f225dfc5914fa39da859b3eaffad0aacbad3) resolver: store rooted names in Hosts map - [`0ad0303`](https://github.com/hickory-dns/hickory-dns/commit/0ad0303e16ddcfb10d5cb6909db6a95d8ec81b2b) resolver: simplify hosts file parser - [`f87921e`](https://github.com/hickory-dns/hickory-dns/commit/f87921e79d7dca15c4a4ac7240de4c2e27d41ca8) resolver: reduce rightward drift in hosts file parser - [`857a199`](https://github.com/hickory-dns/hickory-dns/commit/857a199b37ff4dcd5e7458543d4531bd0e2c8670) resolver: move read_hosts() to Hosts::from_file() - [`cf0ab7d`](https://github.com/hickory-dns/hickory-dns/commit/cf0ab7d47e5f8734c84472d778d6b9fe88902bb1) resolver: externalize I/O errors from hosts file parsing - [`da4b7d6`](https://github.com/hickory-dns/hickory-dns/commit/da4b7d6f3730c8c3518134c80cf43f490b7e88d6) resolver: reduce rightward drift in LookupIpFuture impl - [`aeef6af`](https://github.com/hickory-dns/hickory-dns/commit/aeef6af3f54c239051fcd06c6bfdac3b9874ff03) resolver: change CachingClient::lookup() to take &self ### 📊 Changes **5 files changed** (+367 additions, -460 deletions) <details> <summary>View changed files</summary> 📝 `crates/resolver/src/caching_client.rs` (+4 -4) 📝 `crates/resolver/src/hosts.rs` (+71 -56) 📝 `crates/resolver/src/lookup_ip.rs` (+271 -385) 📝 `crates/resolver/src/resolver.rs` (+18 -12) 📝 `tests/integration-tests/tests/integration/lookup_tests.rs` (+3 -3) </details> ### 📄 Description Fixes #2836. Regression from #2560. Assorted refactoring of the surrounding code included. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-16 11:39:17 +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#3357
No description provided.