mirror of
http://thekelleys.org.uk/git/dnsmasq.git
synced 2026-12-04 22:08:27 +00:00
Don't waste time caching zero-TTL DNS records.
This commit is contained in:
1 file changed
+7
@@ -500,6 +500,13 @@ 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. */
|
||||||
|
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. */
|
||||||
if ((new = cache_scan_free(name, addr, class, now, flags, &target_crec, &target_uid)))
|
if ((new = cache_scan_free(name, addr, class, now, flags, &target_crec, &target_uid)))
|
||||||
|
|||||||
Reference in new issue
Block a user