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:
@@ -500,6 +500,13 @@ 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)
|
||||
{
|
||||
insert_error = 1;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* First remove any expired entries and entries for the name/address we
|
||||
are currently inserting. */
|
||||
if ((new = cache_scan_free(name, addr, class, now, flags, &target_crec, &target_uid)))
|
||||
|
||||
Reference in New Issue
Block a user