[PR #2609] [MERGED] Conformance: tests for handling of TC=1 responses #3178

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

📋 Pull Request Information

Original PR: https://github.com/hickory-dns/hickory-dns/pull/2609
Author: @divergentdave
Created: 11/22/2024
Status: Merged
Merged: 11/26/2024
Merged by: @marcus0x62

Base: mainHead: david/test-caching-truncation


📝 Commits (2)

  • e04fa05 dns-test: Add basic support for TXT records
  • 416537a Conformance: tests for handling of TC=1 responses

📊 Changes

6 files changed (+405 additions, -1 deletions)

View changed files

📝 conformance/packages/conformance-tests/src/resolver/dns.rs (+1 -0)
conformance/packages/conformance-tests/src/resolver/dns/rfc1035.rs (+1 -0)
conformance/packages/conformance-tests/src/resolver/dns/rfc1035/truncated_udp_only.py (+36 -0)
conformance/packages/conformance-tests/src/resolver/dns/rfc1035/truncated_with_tcp_fallback.py (+46 -0)
conformance/packages/conformance-tests/src/resolver/dns/rfc1035/truncation.rs (+161 -0)
📝 conformance/packages/dns-test/src/record.rs (+160 -1)

📄 Description

This adds two conformance tests for handling of responses with TC=1. See #2608. The first test checks that recursive resolvers retry queries via TCP if they get a truncated response over UDP. The second test checks what happens if resolvers get a truncated response, but the authoritative server doesn't respond to TCP queries. Currently, BIND and Unbound return a SERVFAIL, while Hickory passes on the truncated response, and caches it. Both tests use dnslib-based authoritative servers, which return records indicating what transport protocol is in use, with different incrementing counter values in each response, so we can tell whether the recursive resolver is caching responses.


🔄 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/2609 **Author:** [@divergentdave](https://github.com/divergentdave) **Created:** 11/22/2024 **Status:** ✅ Merged **Merged:** 11/26/2024 **Merged by:** [@marcus0x62](https://github.com/marcus0x62) **Base:** `main` ← **Head:** `david/test-caching-truncation` --- ### 📝 Commits (2) - [`e04fa05`](https://github.com/hickory-dns/hickory-dns/commit/e04fa05cea265da7205aad94abcbb3ec8ba5e1eb) dns-test: Add basic support for TXT records - [`416537a`](https://github.com/hickory-dns/hickory-dns/commit/416537a5669ca35afdb61b7d869c03c2499de2e1) Conformance: tests for handling of TC=1 responses ### 📊 Changes **6 files changed** (+405 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `conformance/packages/conformance-tests/src/resolver/dns.rs` (+1 -0) ➕ `conformance/packages/conformance-tests/src/resolver/dns/rfc1035.rs` (+1 -0) ➕ `conformance/packages/conformance-tests/src/resolver/dns/rfc1035/truncated_udp_only.py` (+36 -0) ➕ `conformance/packages/conformance-tests/src/resolver/dns/rfc1035/truncated_with_tcp_fallback.py` (+46 -0) ➕ `conformance/packages/conformance-tests/src/resolver/dns/rfc1035/truncation.rs` (+161 -0) 📝 `conformance/packages/dns-test/src/record.rs` (+160 -1) </details> ### 📄 Description This adds two conformance tests for handling of responses with TC=1. See #2608. The first test checks that recursive resolvers retry queries via TCP if they get a truncated response over UDP. The second test checks what happens if resolvers get a truncated response, but the authoritative server doesn't respond to TCP queries. Currently, BIND and Unbound return a SERVFAIL, while Hickory passes on the truncated response, and caches it. Both tests use dnslib-based authoritative servers, which return records indicating what transport protocol is in use, with different incrementing counter values in each response, so we can tell whether the recursive resolver is caching responses. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-16 11:29: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#3178
No description provided.