mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 10:18:25 +00:00
Cache zero-TTL DNS replies when stale-caching is enabled.
This commit is contained in:
@@ -629,8 +629,8 @@ static struct crec *really_insert(char *name, union all_addr *addr, unsigned sho
|
||||
if (insert_error)
|
||||
return NULL;
|
||||
|
||||
/* we don't cache zero-TTL records. */
|
||||
if (ttl == 0)
|
||||
/* we don't cache zero-TTL records unless we're doing stale-caching. */
|
||||
if (daemon->cache_max_expiry == 0 && ttl == 0)
|
||||
{
|
||||
insert_error = 1;
|
||||
return NULL;
|
||||
|
||||
Reference in New Issue
Block a user