mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-25 03:05:51 +03:00
[PR #444] [MERGED] Expose TTLs on lookups #1445
Labels
No labels
blocked
breaking-change
bug
bug:critical
bug:tests
cleanup
compliance
compliance
compliance
crate:all
crate:client
crate:native-tls
crate:proto
crate:recursor
crate:resolver
crate:resolver
crate:rustls
crate:server
crate:util
dependencies
docs
duplicate
easy
easy
enhance
enhance
enhance
feature:dns-over-https
feature:dns-over-quic
feature:dns-over-tls
feature:dnsssec
feature:global_lb
feature:mdns
feature:tsig
features:edns
has workaround
ops
perf
platform:WASM
platform:android
platform:fuchsia
platform:linux
platform:macos
platform:windows
pull-request
question
test
tools
tools
trust
unclear
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hickory-dns#1445
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/hickory-dns/hickory-dns/pull/444
Author: @hawkw
Created: 5/1/2018
Status: ✅ Merged
Merged: 5/3/2018
Merged by: @bluejekyll
Base:
master← Head:eliza/resolver-ttls📝 Commits (10+)
7a39685resolver: expose TTL on Lookup905c243resolver: make lookup TTLs accessible from LookupIpe4e8886resolver: use the lower TTL whenappending75cbbcdresolver: change lookup TTLs to deadlines rather than durations4b61badresolver: Change method names to better reflect that they're deadlines3d37bc3resolver: rename LruValue.ttl_until for consistency7ad65fcresolver: fix test for Lookup deadlinesfda17ebReview feedback526b8d7resolver: useMAX_TTLrather thanNonewhen TTL is unknown1dfc697resolver: Review feedback📊 Changes
6 files changed (+54 additions, -21 deletions)
View changed files
📝
integration-tests/tests/lookup_tests.rs(+1 -1)📝
resolver/src/dns_lru.rs(+11 -11)📝
resolver/src/hosts.rs(+3 -3)📝
resolver/src/lookup.rs(+32 -5)📝
resolver/src/lookup_ip.rs(+6 -0)📝
resolver/src/resolver_future.rs(+1 -1)📄 Description
This PR changes the
trust-dns-resolverAPI to expose the TTLs of DNSlookups, which is needed downstream in Conduit (runconduit/conduit#711).
Reviewers should note the following:
Lookups were constructed in places where the TTL is notknown or there is no TTL (e.g. for
localhostinlookup_state.rs).Therefore, I made the TTL field on
Lookupoptional, and added a newLookup::new_with_ttlconstructor, to avoid breaking existing code.appending twoLookups, if both have known TTLs, the returnedLookuphas the lower of the two TTLs. Thus, the appendedLookupshould time out when the shorter-lived of either of its constituents
does. This seemed like the correct behaviour to me, so that
appenddoesn't become a way for short-lived
Lookups to escape their TTLs,but I wasn't sure about this --- please let me know if this intuition
is incorrect!
TTLfunction inlookup.rs.Signed-off-by: Eliza Weisman eliza@buoyant.io
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.