[PR #491] [MERGED] resolver: Add maximum TTL config option #1474

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

📋 Pull Request Information

Original PR: https://github.com/hickory-dns/hickory-dns/pull/491
Author: @hawkw
Created: 5/25/2018
Status: Merged
Merged: 5/28/2018
Merged by: @bluejekyll

Base: masterHead: eliza/max_ttls


📝 Commits (8)

  • b586157 resolver: Add positive_max_ttl/negative_max_ttl to dns_lru::TtlConfig
  • f30218d resolver: Add unit tests for positive_max_ttl
  • 033c1a4 resolver: DnsLru limits to configured positive max TTL
  • f81b245 resolver: Add unit tests for DnsLru min/max negative TTLs
  • b96b493 resolver: Limit TTLs for negative responses to configured max
  • 313c379 resolver: Add maximum TTL config fields to ResolverOpts
  • 0364aef Merge branch 'master' into eliza/max_ttls
  • 373a076 Add comment about TTL max value

📊 Changes

4 files changed (+270 additions, -47 deletions)

View changed files

📝 resolver/src/config.rs (+22 -6)
📝 resolver/src/dns_lru.rs (+240 -29)
📝 resolver/src/resolver.rs (+4 -6)
📝 resolver/src/resolver_future.rs (+4 -6)

📄 Description

This is a simple follow up from #484. It adds support for setting a maximum TTL for positive and negative responses on DnsLru, as well as the minimum TTLs that were previously added. I've also improved the documentation for all the TTL configuration options, and changed the names slightly to (hopefully) make the code a little more readable.

In addition, I've added unit tests for the new configs, as well as for the negative_min_ttl that was added previously but not tested.

Closes #489.


🔄 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/491 **Author:** [@hawkw](https://github.com/hawkw) **Created:** 5/25/2018 **Status:** ✅ Merged **Merged:** 5/28/2018 **Merged by:** [@bluejekyll](https://github.com/bluejekyll) **Base:** `master` ← **Head:** `eliza/max_ttls` --- ### 📝 Commits (8) - [`b586157`](https://github.com/hickory-dns/hickory-dns/commit/b5861578126fd4b178fd6db8aa97e1625f476fa7) resolver: Add positive_max_ttl/negative_max_ttl to dns_lru::TtlConfig - [`f30218d`](https://github.com/hickory-dns/hickory-dns/commit/f30218dce0caca801de6f8d3c865619150354267) resolver: Add unit tests for positive_max_ttl - [`033c1a4`](https://github.com/hickory-dns/hickory-dns/commit/033c1a4f104d1ebfcc11e2093774485d892b608c) resolver: DnsLru limits to configured positive max TTL - [`f81b245`](https://github.com/hickory-dns/hickory-dns/commit/f81b245c9ba16c668cc146de43da6af56178949d) resolver: Add unit tests for DnsLru min/max negative TTLs - [`b96b493`](https://github.com/hickory-dns/hickory-dns/commit/b96b493da30f2df5de13379a65c0b1fc98b07fda) resolver: Limit TTLs for negative responses to configured max - [`313c379`](https://github.com/hickory-dns/hickory-dns/commit/313c379d3e68bc8b987f35de0942a0c8ebe05e36) resolver: Add maximum TTL config fields to ResolverOpts - [`0364aef`](https://github.com/hickory-dns/hickory-dns/commit/0364aefb761b1286c1ecca4a38df6dfcfd64a02d) Merge branch 'master' into eliza/max_ttls - [`373a076`](https://github.com/hickory-dns/hickory-dns/commit/373a076c0cf852fbbccf4f7287f69b3cea9fba4a) Add comment about TTL max value ### 📊 Changes **4 files changed** (+270 additions, -47 deletions) <details> <summary>View changed files</summary> 📝 `resolver/src/config.rs` (+22 -6) 📝 `resolver/src/dns_lru.rs` (+240 -29) 📝 `resolver/src/resolver.rs` (+4 -6) 📝 `resolver/src/resolver_future.rs` (+4 -6) </details> ### 📄 Description This is a simple follow up from #484. It adds support for setting a maximum TTL for positive and negative responses on `DnsLru`, as well as the minimum TTLs that were previously added. I've also improved the documentation for all the TTL configuration options, and changed the names slightly to (hopefully) make the code a little more readable. In addition, I've added unit tests for the new configs, as well as for the `negative_min_ttl` that was added previously but not tested. Closes #489. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-16 02:08:23 +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#1474
No description provided.