[PR #2551] [MERGED] Recursor: set RD=0 in queries to nameservers #3130

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

📋 Pull Request Information

Original PR: https://github.com/hickory-dns/hickory-dns/pull/2551
Author: @divergentdave
Created: 11/5/2024
Status: Merged
Merged: 11/6/2024
Merged by: @djc

Base: mainHead: david/recursor-clear-rd


📝 Commits (1)

  • bb85cca Recursor: set RD=0 in queries to nameservers

📊 Changes

3 files changed (+83 additions, -0 deletions)

View changed files

📝 conformance/packages/conformance-tests/src/resolver/dns/scenarios.rs (+61 -0)
📝 conformance/packages/dns-test/src/tshark.rs (+17 -0)
📝 crates/recursor/src/recursor_pool.rs (+5 -0)

📄 Description

I noticed while using the explore example target that the Hickory recursor is setting RD=1 in outgoing queries. A default value of true was inherited from DnsRequestOptions::default(), and never cleared. This can be a problem if another recursive resolver is erroneously listed as an authority for some zone. (If the name server isn't authoritative, then further queries are wasteful, and two such servers and erroneous zone referrals could be set up into a loop) This PR corrects that, and adds a conformance test checking the flag.


🔄 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/2551 **Author:** [@divergentdave](https://github.com/divergentdave) **Created:** 11/5/2024 **Status:** ✅ Merged **Merged:** 11/6/2024 **Merged by:** [@djc](https://github.com/djc) **Base:** `main` ← **Head:** `david/recursor-clear-rd` --- ### 📝 Commits (1) - [`bb85cca`](https://github.com/hickory-dns/hickory-dns/commit/bb85cca52fbf2e3159d4e2d60211d706eeb3df07) Recursor: set RD=0 in queries to nameservers ### 📊 Changes **3 files changed** (+83 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `conformance/packages/conformance-tests/src/resolver/dns/scenarios.rs` (+61 -0) 📝 `conformance/packages/dns-test/src/tshark.rs` (+17 -0) 📝 `crates/recursor/src/recursor_pool.rs` (+5 -0) </details> ### 📄 Description I noticed while using the `explore` example target that the Hickory recursor is setting `RD=1` in outgoing queries. A default value of `true` was inherited from `DnsRequestOptions::default()`, and never cleared. This can be a problem if another recursive resolver is erroneously listed as an authority for some zone. (If the name server isn't authoritative, then further queries are wasteful, and two such servers and erroneous zone referrals could be set up into a loop) This PR corrects that, and adds a conformance test checking the flag. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-16 11:27:05 +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#3130
No description provided.