summaryrefslogtreecommitdiff
path: root/src/feature/relay
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2022-11-09 15:32:18 -0500
committerDavid Goulet <dgoulet@torproject.org>2022-11-09 15:32:18 -0500
commitc13dc8b08accf24bd0c8533ecbc1ecd1de314a5a (patch)
tree8a92de59c0f8ef141aeb14b3d49c62413e228325 /src/feature/relay
parent780ca741f3738877ad577f84fcebf6874427b2bc (diff)
parent21eac1e8d8a116f2dd8dd0a7d150916646ee9120 (diff)
downloadtor-c13dc8b08accf24bd0c8533ecbc1ecd1de314a5a.tar.gz
tor-c13dc8b08accf24bd0c8533ecbc1ecd1de314a5a.zip
Merge branch 'ticket40674_047_01' into maint-0.4.7
Diffstat (limited to 'src/feature/relay')
-rw-r--r--src/feature/relay/dns.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/feature/relay/dns.c b/src/feature/relay/dns.c
index 4ae4a8e4b9..a38bf5cf5a 100644
--- a/src/feature/relay/dns.c
+++ b/src/feature/relay/dns.c
@@ -512,7 +512,7 @@ send_resolved_cell,(edge_connection_t *conn, uint8_t answer_type,
uint32_t ttl;
buf[0] = answer_type;
- ttl = clip_dns_ttl(conn->address_ttl);
+ ttl = conn->address_ttl;
switch (answer_type)
{
@@ -584,7 +584,7 @@ send_resolved_hostname_cell,(edge_connection_t *conn,
size_t namelen = strlen(hostname);
tor_assert(namelen < 256);
- ttl = clip_dns_ttl(conn->address_ttl);
+ ttl = conn->address_ttl;
buf[0] = RESOLVED_TYPE_HOSTNAME;
buf[1] = (uint8_t)namelen;
@@ -1310,7 +1310,7 @@ make_pending_resolve_cached(cached_resolve_t *resolve)
resolve->ttl_hostname < ttl)
ttl = resolve->ttl_hostname;
- set_expiry(new_resolve, time(NULL) + clip_dns_ttl(ttl));
+ set_expiry(new_resolve, time(NULL) + ttl);
}
assert_cache_ok();
@@ -1725,7 +1725,7 @@ evdns_callback(int result, char type, int count, int ttl, void *addresses,
}
if (result != DNS_ERR_SHUTDOWN)
dns_found_answer(string_address, orig_query_type,
- result, &addr, hostname, ttl);
+ result, &addr, hostname, clip_dns_fuzzy_ttl(ttl));
/* The result can be changed within this function thus why we note the result
* at the end. */