[PR #305] [CLOSED] (wip) use resolv_conf to parse resolv.conf files #1356

Closed
opened 2026-03-16 02:02:09 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hickory-dns/hickory-dns/pull/305
Author: @little-dude
Created: 12/1/2017
Status: Closed

Base: masterHead: resolvconf


📝 Commits (3)

  • 0a05c84 resolver: use resolv_conf to parse config files
  • 7b54029 resolver: make domain optional
  • b97607b resolver: improve domain detection on unix

📊 Changes

10 files changed (+501 additions, -748 deletions)

View changed files

📝 Cargo.lock (+53 -157)
📝 resolver/Cargo.toml (+4 -7)
resolver/build.rs (+0 -10)
📝 resolver/src/config.rs (+21 -11)
📝 resolver/src/lib.rs (+3 -1)
📝 resolver/src/resolver_future.rs (+8 -6)
📝 resolver/src/system_conf/mod.rs (+6 -373)
resolver/src/system_conf/resolv_conf.lalrpop (+0 -55)
resolver/src/system_conf/resolv_conf_ast.rs (+0 -128)
resolver/src/system_conf/unix.rs (+406 -0)

📄 Description

This is still work in progress but I'm opening early to have feedback about whether this is the right direction.
Here is what I did:

  • get rid of the lalrpop parser
  • move unix specific stuff to a unix.rs module
  • derived a couple more trait on the config types (Eq is convenient to have for tests, and Copy is convenient for NameServerConfig)

Note that for the moment, this depends on https://github.com/tailhook/resolv-conf/pull/5

Also, for the moment resolv-conf does not make a distinction between domain and search: github.com/tailhook/resolv-conf@d7ab0ce0a8/src/grammar.rs (L141-L149)

I think this is an issue.


🔄 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/305 **Author:** [@little-dude](https://github.com/little-dude) **Created:** 12/1/2017 **Status:** ❌ Closed **Base:** `master` ← **Head:** `resolvconf` --- ### 📝 Commits (3) - [`0a05c84`](https://github.com/hickory-dns/hickory-dns/commit/0a05c8462055b36ffd095988478e8c7296ae808f) resolver: use resolv_conf to parse config files - [`7b54029`](https://github.com/hickory-dns/hickory-dns/commit/7b540298bd3f0bc94d3d0fdb7bc664b76f37502c) resolver: make domain optional - [`b97607b`](https://github.com/hickory-dns/hickory-dns/commit/b97607befea146db255d32d586449d61f96f0faa) resolver: improve domain detection on unix ### 📊 Changes **10 files changed** (+501 additions, -748 deletions) <details> <summary>View changed files</summary> 📝 `Cargo.lock` (+53 -157) 📝 `resolver/Cargo.toml` (+4 -7) ➖ `resolver/build.rs` (+0 -10) 📝 `resolver/src/config.rs` (+21 -11) 📝 `resolver/src/lib.rs` (+3 -1) 📝 `resolver/src/resolver_future.rs` (+8 -6) 📝 `resolver/src/system_conf/mod.rs` (+6 -373) ➖ `resolver/src/system_conf/resolv_conf.lalrpop` (+0 -55) ➖ `resolver/src/system_conf/resolv_conf_ast.rs` (+0 -128) ➕ `resolver/src/system_conf/unix.rs` (+406 -0) </details> ### 📄 Description This is still work in progress but I'm opening early to have feedback about whether this is the right direction. Here is what I did: - get rid of the lalrpop parser - move unix specific stuff to a unix.rs module - derived a couple more trait on the config types (`Eq` is convenient to have for tests, and `Copy` is convenient for `NameServerConfig`) Note that for the moment, this depends on https://github.com/tailhook/resolv-conf/pull/5 Also, for the moment `resolv-conf` does not make a distinction between `domain` and `search`: https://github.com/tailhook/resolv-conf/blob/d7ab0ce0a80f6433dbb6ba32468ad3e6b5d272c2/src/grammar.rs#L141-L149 I think this is an issue. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-16 02:02:09 +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#1356
No description provided.