[PR #3156] [MERGED] Recursor: better handling of cached referral responses #3604

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

📋 Pull Request Information

Original PR: https://github.com/hickory-dns/hickory-dns/pull/3156
Author: @divergentdave
Created: 7/24/2025
Status: Merged
Merged: 7/29/2025
Merged by: @divergentdave

Base: mainHead: david/recursor-cache-referral-handling


📝 Commits (8)

  • fe9c140 Split cache fetch out of RecursorDnsHandle::lookup
  • de0ee9e Flatten match arms
  • 17592f0 Inline and simplify one method call
  • ba79235 Flip if statement condition
  • 5755c3d Ignore cached referral responses
  • e4600da Check AA on cache entries in two other places
  • 0aa4a39 Remove "any matching RRSIG" logic on cache fetches
  • 0d66908 Use structured logging

📊 Changes

4 files changed (+60 additions, -62 deletions)

View changed files

📝 conformance/packages/conformance-tests/src/resolver/dns/regression.rs (+0 -1)
📝 conformance/packages/conformance-tests/src/resolver/dnssec/scenarios/no_soa.rs (+1 -0)
📝 crates/recursor/src/recursor.rs (+3 -3)
📝 crates/recursor/src/recursor_dns_handle.rs (+56 -58)

📄 Description

This changes the recursor so that we only re-use cached referral responses in the context of ns_pool_for_zone(), and ignore them everywhere else. Looking at the header flags lets us remove some complicated DNSSEC-specific logic as well.

I'm opening this as a draft for now, stacked on top of #3155. This is related to #3008 and #3125.


🔄 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/3156 **Author:** [@divergentdave](https://github.com/divergentdave) **Created:** 7/24/2025 **Status:** ✅ Merged **Merged:** 7/29/2025 **Merged by:** [@divergentdave](https://github.com/divergentdave) **Base:** `main` ← **Head:** `david/recursor-cache-referral-handling` --- ### 📝 Commits (8) - [`fe9c140`](https://github.com/hickory-dns/hickory-dns/commit/fe9c1406899ca17c6f50ae5988ee51a6579e4963) Split cache fetch out of RecursorDnsHandle::lookup - [`de0ee9e`](https://github.com/hickory-dns/hickory-dns/commit/de0ee9ec5b1f7fe79b649987310f59dfcf270ec3) Flatten match arms - [`17592f0`](https://github.com/hickory-dns/hickory-dns/commit/17592f0cbbcd5d1e0e00364289f103dad73131f9) Inline and simplify one method call - [`ba79235`](https://github.com/hickory-dns/hickory-dns/commit/ba7923506b64325417d1fc08a64dc1fbb68c1059) Flip if statement condition - [`5755c3d`](https://github.com/hickory-dns/hickory-dns/commit/5755c3dd51102949389ff1900e84a172207f456d) Ignore cached referral responses - [`e4600da`](https://github.com/hickory-dns/hickory-dns/commit/e4600da3cc57ad4e8dac6bd39f06460db08d5ce2) Check AA on cache entries in two other places - [`0aa4a39`](https://github.com/hickory-dns/hickory-dns/commit/0aa4a398874eee656ca15ec4199e6751b925fc4d) Remove "any matching RRSIG" logic on cache fetches - [`0d66908`](https://github.com/hickory-dns/hickory-dns/commit/0d6690835a047f2997ede53cd5eb06cd1da181e4) Use structured logging ### 📊 Changes **4 files changed** (+60 additions, -62 deletions) <details> <summary>View changed files</summary> 📝 `conformance/packages/conformance-tests/src/resolver/dns/regression.rs` (+0 -1) 📝 `conformance/packages/conformance-tests/src/resolver/dnssec/scenarios/no_soa.rs` (+1 -0) 📝 `crates/recursor/src/recursor.rs` (+3 -3) 📝 `crates/recursor/src/recursor_dns_handle.rs` (+56 -58) </details> ### 📄 Description This changes the recursor so that we only re-use cached referral responses in the context of `ns_pool_for_zone()`, and ignore them everywhere else. Looking at the header flags lets us remove some complicated DNSSEC-specific logic as well. I'm opening this as a draft for now, stacked on top of #3155. This is related to #3008 and #3125. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-16 11:52:36 +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#3604
No description provided.