diff options
author | Tom Gundersen <teg@jklm.no> | 2015-11-27 01:18:38 +0100 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2015-11-27 01:18:38 +0100 |
commit | 90c739259fc35feb773b953d61f75790cacf6b15 (patch) | |
tree | a3057f2649986351c1364626261f46f1880ad7d6 /src/resolve/resolved-dns-transaction.c | |
parent | 8a7a7e971e97830fd722fb73ef87f7180180cc27 (diff) | |
parent | daa27350c373b3b177f86e89c0d1dbe0b94554d6 (diff) |
Merge pull request #2042 from poettering/resolved-various-3
resolved: Flush caches more agressively, fixes #2038
Diffstat (limited to 'src/resolve/resolved-dns-transaction.c')
-rw-r--r-- | src/resolve/resolved-dns-transaction.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/resolve/resolved-dns-transaction.c b/src/resolve/resolved-dns-transaction.c index c65c9c9f49..8c4f23a4da 100644 --- a/src/resolve/resolved-dns-transaction.c +++ b/src/resolve/resolved-dns-transaction.c @@ -478,7 +478,8 @@ void dns_transaction_process_reply(DnsTransaction *t, DnsPacket *p) { } /* According to RFC 4795, section 2.9. only the RRs from the answer section shall be cached */ - dns_cache_put(&t->scope->cache, t->key, DNS_PACKET_RCODE(p), p->answer, DNS_PACKET_ANCOUNT(p), 0, p->family, &p->sender); + if (DNS_PACKET_SHALL_CACHE(p)) + dns_cache_put(&t->scope->cache, t->key, DNS_PACKET_RCODE(p), p->answer, DNS_PACKET_ANCOUNT(p), 0, p->family, &p->sender); if (DNS_PACKET_RCODE(p) == DNS_RCODE_SUCCESS) dns_transaction_complete(t, DNS_TRANSACTION_SUCCESS); |