dualstack: update cache when ipv6 not exists

This commit is contained in:
Nick Peng
2020-05-04 01:37:52 +08:00
parent 770ce9e8bc
commit c1f9941427
2 changed files with 20 additions and 20 deletions

View File

@@ -130,7 +130,7 @@ int dns_cache_replace(char *domain, char *cname, int cname_ttl, int ttl, dns_typ
/* lookup existing cache */
dns_cache = dns_cache_lookup(domain, qtype);
if (dns_cache == NULL) {
return 0;
return dns_cache_insert(domain, cname, cname_ttl, ttl, qtype, addr, addr_len, speed);
}
if (ttl < DNS_CACHE_TTL_MIN) {