diff options
author | Tom Gundersen <teg@jklm.no> | 2015-09-04 01:58:20 +0200 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2015-09-16 17:03:18 +0200 |
commit | 5eefe544efbfbbd0d0026ca28913a9e82fec187c (patch) | |
tree | 99ef11732f301e00ac213d58a91690dd4f9b66f8 /src/resolve/resolved-dns-answer.h | |
parent | 5643c00afe29eae4b2e3575277038e60e6967d09 (diff) |
resolved: cache - cache what we can of negative redirect chains
When a NXDATA or a NODATA response is received for an alias it may
include CNAME records from the redirect chain. We should cache the
response for each of these names to avoid needless roundtrips in
the future.
It is not sufficient to do the negative caching only for the
canonical name, as the included redirection chain is not guaranteed
to be complete. In fact, only the final CNAME record from the chain
is guaranteed to be included.
We take care not to cache entries that redirects outside the current
zone, as the SOA will then not be valid.
Diffstat (limited to 'src/resolve/resolved-dns-answer.h')
-rw-r--r-- | src/resolve/resolved-dns-answer.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/resolve/resolved-dns-answer.h b/src/resolve/resolved-dns-answer.h index 0757dd60d0..044d73b19c 100644 --- a/src/resolve/resolved-dns-answer.h +++ b/src/resolve/resolved-dns-answer.h @@ -49,6 +49,7 @@ DnsAnswer *dns_answer_unref(DnsAnswer *a); int dns_answer_add(DnsAnswer *a, DnsResourceRecord *rr, int ifindex); int dns_answer_add_soa(DnsAnswer *a, const char *name, uint32_t ttl); int dns_answer_contains(DnsAnswer *a, DnsResourceKey *key); +int dns_answer_match_soa(DnsResourceKey *key, DnsResourceKey *soa); int dns_answer_find_soa(DnsAnswer *a, DnsResourceKey *key, DnsResourceRecord **ret); DnsAnswer *dns_answer_merge(DnsAnswer *a, DnsAnswer *b); |