[GH-ISSUE #1751] The TTL of the returned DNS query is always the result of the query to the superior #759

Closed
opened 2026-03-16 00:09:30 +03:00 by kerem · 1 comment
Owner

Originally created by @Skyxim on GitHub (Aug 1, 2022).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/1751

Describe the bug
I use trust-dns as a forwarding server, but trust-dns always has the same ttl for each query, unless the cache expires and re-queries its superiors

To Reproduce

  1. I have a local dns server (use AdguardHome)
  2. Rewrite the abc.com return to 1.1.1.1, AdguardHome default ttl is 10
  3. After the first query, repeated queries will result in a ttl of 10
image

Expected behavior
Ttl should change over time

System:

  • OS: macOS13.0 (22A5311f)
  • Architecture: aarch64
  • Version 13.0 (22A5311f)
  • rustc version: 1.62.1 (e092d0b6b 2022-07-16)

Version:
Crate: server
Version: commit id [19e3d2b4]

Additional context
Test config

listen_addrs_ipv4=["0.0.0.0"]
tls_listen_port=6853
listen_port = 6053
https_listen_port=6443
log_level="debug"


[[zones]]
## zone: this is the ORIGIN of the zone, aka the base name, '.' is implied on the end
##  specifying something other than '.' here, will restrict this forwarder to only queries
##  where the search name is a subzone of the name, e.g. if zone is "example.com.", then
##  queries for "www.example.com" or "example.com" would be forwarded.
zone = "."

## zone_type: Primary, Secondary, Hint, Forward
zone_type = "Forward"

## remember the port, defaults: 53 for Udp & Tcp, 853 for Tls and 443 for Https.
##   Tls and/or Https require features dns-over-tls and/or dns-over-https
stores = { type = "forward", name_servers = [{ socket_addr = "10.0.0.4:6053", protocol = "udp", trust_nx_responses = false }],options={cache_size=3000} }

Originally created by @Skyxim on GitHub (Aug 1, 2022). Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/1751 **Describe the bug** I use trust-dns as a forwarding server, but trust-dns always has the same ttl for each query, unless the cache expires and re-queries its superiors **To Reproduce** 1. I have a local dns server (use AdguardHome) 2. Rewrite the abc.com return to 1.1.1.1, AdguardHome default ttl is 10 3. After the first query, repeated queries will result in a ttl of 10 <img width="1634" alt="image" src="https://user-images.githubusercontent.com/70276018/182158403-756520ea-91ef-480c-9e6f-cb7460b15e6b.png"> **Expected behavior** Ttl should change over time **System:** - OS: macOS13.0 (22A5311f) - Architecture: aarch64 - Version 13.0 (22A5311f) - rustc version: 1.62.1 (e092d0b6b 2022-07-16) **Version:** Crate: server Version: commit id [19e3d2b4] **Additional context** Test config ``` listen_addrs_ipv4=["0.0.0.0"] tls_listen_port=6853 listen_port = 6053 https_listen_port=6443 log_level="debug" [[zones]] ## zone: this is the ORIGIN of the zone, aka the base name, '.' is implied on the end ## specifying something other than '.' here, will restrict this forwarder to only queries ## where the search name is a subzone of the name, e.g. if zone is "example.com.", then ## queries for "www.example.com" or "example.com" would be forwarded. zone = "." ## zone_type: Primary, Secondary, Hint, Forward zone_type = "Forward" ## remember the port, defaults: 53 for Udp & Tcp, 853 for Tls and 443 for Https. ## Tls and/or Https require features dns-over-tls and/or dns-over-https stores = { type = "forward", name_servers = [{ socket_addr = "10.0.0.4:6053", protocol = "udp", trust_nx_responses = false }],options={cache_size=3000} } ```
kerem 2026-03-16 00:09:30 +03:00
Author
Owner

@bluejekyll commented on GitHub (Aug 5, 2022):

Thanks for the issue.

<!-- gh-comment-id:1206804051 --> @bluejekyll commented on GitHub (Aug 5, 2022): Thanks for the issue.
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#759
No description provided.