mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 10:18:25 +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 (insert_error)
|
||||
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
|
||||
are currently inserting. */
|
||||
|
||||
Reference in New Issue
Block a user