cache: optimize cname TTL

This commit is contained in:
Nick Peng
2022-02-17 23:15:11 +08:00
parent 0652316e98
commit d7d7ef48cd
4 changed files with 52 additions and 3 deletions

View File

@@ -430,7 +430,7 @@ int dns_cache_get_cname_ttl(struct dns_cache *dns_cache)
}
int addr_ttl = dns_cache_get_ttl(dns_cache);
if (ttl < addr_ttl) {
if (ttl < addr_ttl && ttl < 0) {
return addr_ttl;
}