[PR #1660] [MERGED] force forwarder to preserve_intermediates #2486

Closed
opened 2026-03-16 08:56:32 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hickory-dns/hickory-dns/pull/1660
Author: @vlmutolo
Created: 3/9/2022
Status: Merged
Merged: 3/17/2022
Merged by: @bluejekyll

Base: mainHead: main


📝 Commits (2)

  • e198388 force forwarder to preserve_intermediates
  • 0afe175 set preserve_intermediates default to true

📊 Changes

2 files changed (+25 additions, -2 deletions)

View changed files

📝 crates/resolver/src/config.rs (+4 -1)
📝 crates/server/src/store/forwarder/authority.rs (+21 -1)

📄 Description

According to RFC 1034, Section 4.3.2 step 3/a:

If the data at the node is a CNAME, and QTYPE doesn't
match CNAME, copy the CNAME RR into the answer section
of the response, change QNAME to the canonical name in
the CNAME RR, and go back to step 1.

This paragraph is describing the required behavior for name servers,
which includes TrustDNS's forwarder implementation. The behavior of
the forwarder in this context is controlled by a parameter
preserve_intermediates, which determines whether or not the TrustDNS
client implementation will collapse CNAMEs (the "intermediates") into
just the final non-CNAME record (if any), or if the client will resolve
to all found records including CNAMEs.

Because the forwarder uses the client implementation internally, we need
to ensure that preserve_intermediates is set to true when the
forwarder configures its DNS client. Before this commit, the value
defaulted to false unless otherwise specified in a config file.

With this commit, the forwarder will unconditionally set
preserve_intermediates to true, and will warn the user if they have
configured preserve_intermediates to false.

RFC 1034: https://www.rfc-editor.org/rfc/rfc1034.html


🔄 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/1660 **Author:** [@vlmutolo](https://github.com/vlmutolo) **Created:** 3/9/2022 **Status:** ✅ Merged **Merged:** 3/17/2022 **Merged by:** [@bluejekyll](https://github.com/bluejekyll) **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (2) - [`e198388`](https://github.com/hickory-dns/hickory-dns/commit/e198388772933260d45c9a8de009c41a26c4028b) force forwarder to preserve_intermediates - [`0afe175`](https://github.com/hickory-dns/hickory-dns/commit/0afe17598ebe900fd7b91e0a65b72b358af34fd4) set preserve_intermediates default to true ### 📊 Changes **2 files changed** (+25 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `crates/resolver/src/config.rs` (+4 -1) 📝 `crates/server/src/store/forwarder/authority.rs` (+21 -1) </details> ### 📄 Description According to RFC 1034, Section 4.3.2 step 3/a: If the data at the node is a CNAME, and QTYPE doesn't match CNAME, copy the CNAME RR into the answer section of the response, change QNAME to the canonical name in the CNAME RR, and go back to step 1. This paragraph is describing the required behavior for name servers, which includes TrustDNS's forwarder implementation. The behavior of the forwarder in this context is controlled by a parameter `preserve_intermediates`, which determines whether or not the TrustDNS client implementation will collapse CNAMEs (the "intermediates") into just the final non-CNAME record (if any), or if the client will resolve to all found records including CNAMEs. Because the forwarder uses the client implementation internally, we need to ensure that `preserve_intermediates` is set to `true` when the forwarder configures its DNS client. Before this commit, the value defaulted to `false` unless otherwise specified in a config file. With this commit, the forwarder will unconditionally set `preserve_intermediates` to true, and will warn the user if they have configured `preserve_intermediates` to false. RFC 1034: https://www.rfc-editor.org/rfc/rfc1034.html --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-16 08:56:32 +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#2486
No description provided.