diff options
Diffstat (limited to 'src/feature/relay/dns.c')
-rw-r--r-- | src/feature/relay/dns.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/src/feature/relay/dns.c b/src/feature/relay/dns.c index 08fe4d39cf..5f4bddab9d 100644 --- a/src/feature/relay/dns.c +++ b/src/feature/relay/dns.c @@ -268,22 +268,6 @@ has_dns_init_failed(void) return nameserver_config_failed; } -/** Helper: Given a TTL from a DNS response, determine what TTL to give the - * OP that asked us to resolve it, and how long to cache that record - * ourselves. */ -uint32_t -clip_dns_ttl(uint32_t ttl) -{ - /* This logic is a defense against "DefectTor" DNS-based traffic - * confirmation attacks, as in https://nymity.ch/tor-dns/tor-dns.pdf . - * We only give two values: a "low" value and a "high" value. - */ - if (ttl < MIN_DNS_TTL) - return MIN_DNS_TTL; - else - return MAX_DNS_TTL; -} - /** Helper: free storage held by an entry in the DNS cache. */ static void free_cached_resolve_(cached_resolve_t *r) |