[PR #2522] [MERGED] Recursor recursion improvements #3106

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

📋 Pull Request Information

Original PR: https://github.com/hickory-dns/hickory-dns/pull/2522
Author: @marcus0x62
Created: 10/23/2024
Status: Merged
Merged: 10/29/2024
Merged by: @marcus0x62

Base: mainHead: recursor_recursion_improvements


📝 Commits (7)

  • 091dff1 Fix error propagation
  • 59a429f Add recursion_exceeded function
  • 1ed7a74 clean up ns_pool_for_zone glue record loop
  • 5487e5c add missing depth tracking to ns_pool_for_zone and _referral
  • 1442518 Use lookup instead of resolve in ns_pool_for_referral and _zone glue loops
  • ba29da1 refactor append_ips_from_lookup
  • b4ac8a6 Test for infinite recursion fix

📊 Changes

12 files changed (+487 additions, -217 deletions)

View changed files

📝 crates/recursor/src/error.rs (+20 -2)
📝 crates/recursor/src/recursor.rs (+18 -5)
📝 crates/recursor/src/recursor_dns_handle.rs (+209 -204)
📝 crates/server/src/authority/catalog.rs (+1 -0)
📝 crates/server/src/store/recursor/authority.rs (+8 -1)
📝 crates/server/src/store/recursor/config.rs (+8 -0)
📝 tests/e2e-tests/src/recursor.rs (+1 -0)
📝 tests/e2e-tests/src/recursor/cname/scenarios.rs (+1 -2)
tests/e2e-tests/src/recursor/delegation.rs (+1 -0)
tests/e2e-tests/src/recursor/delegation/scenarios.rs (+216 -0)
📝 tests/e2e-tests/src/recursor/security/scenarios.rs (+3 -3)
📝 tests/test-data/test_configs/example_recursor.toml (+1 -0)

📄 Description

This fixes an issue with ns_pool_for_referral where certain lame delegations can cause infinite recursion.


🔄 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/2522 **Author:** [@marcus0x62](https://github.com/marcus0x62) **Created:** 10/23/2024 **Status:** ✅ Merged **Merged:** 10/29/2024 **Merged by:** [@marcus0x62](https://github.com/marcus0x62) **Base:** `main` ← **Head:** `recursor_recursion_improvements` --- ### 📝 Commits (7) - [`091dff1`](https://github.com/hickory-dns/hickory-dns/commit/091dff137a7fb917781323390458bd80a14068c9) Fix error propagation - [`59a429f`](https://github.com/hickory-dns/hickory-dns/commit/59a429f614c2c27a12110a58939318b1f7b131fd) Add recursion_exceeded function - [`1ed7a74`](https://github.com/hickory-dns/hickory-dns/commit/1ed7a748c7008e6d8c25476e91d1d013ba14df34) clean up ns_pool_for_zone glue record loop - [`5487e5c`](https://github.com/hickory-dns/hickory-dns/commit/5487e5c0d0804baa023f316c2b64979040883aa6) add missing depth tracking to ns_pool_for_zone and _referral - [`1442518`](https://github.com/hickory-dns/hickory-dns/commit/1442518974235bac435c49b261b1ef25c4a72aa6) Use lookup instead of resolve in ns_pool_for_referral and _zone glue loops - [`ba29da1`](https://github.com/hickory-dns/hickory-dns/commit/ba29da1aba743d34540fad13effbf7529975c1ba) refactor append_ips_from_lookup - [`b4ac8a6`](https://github.com/hickory-dns/hickory-dns/commit/b4ac8a6182b43f12cebf9528335c70a895472d0c) Test for infinite recursion fix ### 📊 Changes **12 files changed** (+487 additions, -217 deletions) <details> <summary>View changed files</summary> 📝 `crates/recursor/src/error.rs` (+20 -2) 📝 `crates/recursor/src/recursor.rs` (+18 -5) 📝 `crates/recursor/src/recursor_dns_handle.rs` (+209 -204) 📝 `crates/server/src/authority/catalog.rs` (+1 -0) 📝 `crates/server/src/store/recursor/authority.rs` (+8 -1) 📝 `crates/server/src/store/recursor/config.rs` (+8 -0) 📝 `tests/e2e-tests/src/recursor.rs` (+1 -0) 📝 `tests/e2e-tests/src/recursor/cname/scenarios.rs` (+1 -2) ➕ `tests/e2e-tests/src/recursor/delegation.rs` (+1 -0) ➕ `tests/e2e-tests/src/recursor/delegation/scenarios.rs` (+216 -0) 📝 `tests/e2e-tests/src/recursor/security/scenarios.rs` (+3 -3) 📝 `tests/test-data/test_configs/example_recursor.toml` (+1 -0) </details> ### 📄 Description This fixes an issue with ns_pool_for_referral where certain lame delegations can cause infinite recursion. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-16 11:25:34 +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#3106
No description provided.