diff options
author | Lennart Poettering <lennart@poettering.net> | 2014-08-01 00:57:19 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2014-08-01 00:58:13 +0200 |
commit | 95dd6257a6befedb5b811f16d2cc4a0d8f147751 (patch) | |
tree | 11070721f364bb423c59e340c77940a958b855c5 | |
parent | 7be6885326d8316850062a5002c801102496d3bc (diff) |
resolved: don't bother caching negative RRs when the SOA TTL is 0 anyway
-rw-r--r-- | src/resolve/resolved-dns-cache.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/resolve/resolved-dns-cache.c b/src/resolve/resolved-dns-cache.c index f7091f07bf..40fb6c3984 100644 --- a/src/resolve/resolved-dns-cache.c +++ b/src/resolve/resolved-dns-cache.c @@ -320,6 +320,8 @@ static int dns_cache_put_negative(DnsCache *c, DnsResourceKey *key, int rcode, u return 0; if (key->type == DNS_TYPE_ANY) return 0; + if (soa_ttl <= 0) + return 0; if (!IN_SET(rcode, DNS_RCODE_SUCCESS, DNS_RCODE_NXDOMAIN)) return 0; |