mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 18:28: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)
|
if (insert_error)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
/* we don't cache zero-TTL records. */
|
/* we don't cache zero-TTL records unless we're doing stale-caching. */
|
||||||
if (ttl == 0)
|
if (daemon->cache_max_expiry == 0 && ttl == 0)
|
||||||
{
|
{
|
||||||
insert_error = 1;
|
insert_error = 1;
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|||||||
Reference in New Issue
Block a user