mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-20 02:38:32 +00:00
Don't waste time caching zero-TTL DNS records.
This commit is contained in:
@@ -499,6 +499,13 @@ static struct crec *really_insert(char *name, union all_addr *addr, unsigned sho
|
|||||||
/* if previous insertion failed give up now. */
|
/* if previous insertion failed give up now. */
|
||||||
if (insert_error)
|
if (insert_error)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
/* we don't cache zero-TTL records. */
|
||||||
|
if (ttl == 0)
|
||||||
|
{
|
||||||
|
insert_error = 1;
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
/* First remove any expired entries and entries for the name/address we
|
/* First remove any expired entries and entries for the name/address we
|
||||||
are currently inserting. */
|
are currently inserting. */
|
||||||
|
|||||||
Reference in New Issue
Block a user