[PR #2149] [MERGED] Make AsyncResolver take hosts file into account #2844

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

📋 Pull Request Information

Original PR: https://github.com/hickory-dns/hickory-dns/pull/2149
Author: @hch12907
Created: 2/19/2024
Status: Merged
Merged: 8/22/2024
Merged by: @marcus0x62

Base: mainHead: main


📝 Commits (3)

  • 6fc8125 make AsyncResolver take hosts file into account
  • ed5656c Ignore FQDN when forwarding DNS queries
  • 9e3a0d2 Make use_hosts_file a tristate option

📊 Changes

4 files changed (+73 additions, -16 deletions)

View changed files

📝 crates/resolver/src/async_resolver.rs (+13 -8)
📝 crates/resolver/src/config.rs (+18 -3)
📝 crates/resolver/src/lookup.rs (+30 -3)
📝 crates/server/src/store/forwarder/authority.rs (+12 -2)

📄 Description

Closes #2148.

I'm creating the PR for feedback.

This does not actually work. Given a /etc/hosts file containing 201.11.11.11 example.com, looking up the A record for example.com. using AsyncResolver will still return 93.184.216.34, so FQDN seems to trip Hosts::lookup_static_host() up. This is fixed by 9564566.


🔄 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/2149 **Author:** [@hch12907](https://github.com/hch12907) **Created:** 2/19/2024 **Status:** ✅ Merged **Merged:** 8/22/2024 **Merged by:** [@marcus0x62](https://github.com/marcus0x62) **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (3) - [`6fc8125`](https://github.com/hickory-dns/hickory-dns/commit/6fc8125d255707718425828fb230e4670b6789a9) make AsyncResolver take hosts file into account - [`ed5656c`](https://github.com/hickory-dns/hickory-dns/commit/ed5656cb0db67509a32129c6051b5f5f9767d33b) Ignore FQDN when forwarding DNS queries - [`9e3a0d2`](https://github.com/hickory-dns/hickory-dns/commit/9e3a0d26e0aebb5acf0531e366cce5e25401d33d) Make use_hosts_file a tristate option ### 📊 Changes **4 files changed** (+73 additions, -16 deletions) <details> <summary>View changed files</summary> 📝 `crates/resolver/src/async_resolver.rs` (+13 -8) 📝 `crates/resolver/src/config.rs` (+18 -3) 📝 `crates/resolver/src/lookup.rs` (+30 -3) 📝 `crates/server/src/store/forwarder/authority.rs` (+12 -2) </details> ### 📄 Description Closes #2148. I'm creating the PR for feedback. ~This does not actually work. Given a `/etc/hosts` file containing `201.11.11.11 example.com`, looking up the A record for `example.com.` using `AsyncResolver` will still return `93.184.216.34`, so FQDN seems to trip `Hosts::lookup_static_host()` up.~ This is fixed by 9564566. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-16 11:11:10 +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#2844
No description provided.