Skip to content
Permalink
Browse files

resolve: do not hit CNAME or DNAME entry in NODATA cache (#9836)

Fixes #9833.
  • Loading branch information
yuwata committed Aug 13, 2018
1 parent 5d3bab7 commit 3740146a4cbd99883af79e375ee4836206dcea4e
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/resolve/resolved-dns-cache.c
@@ -783,7 +783,7 @@ static DnsCacheItem *dns_cache_get_by_key_follow_cname_dname_nsec(DnsCache *c, D
if (dns_type_may_redirect(k->type)) {
/* Check if we have a CNAME record instead */
i = hashmap_get(c->by_key, &DNS_RESOURCE_KEY_CONST(k->class, DNS_TYPE_CNAME, n));
if (i)
if (i && i->type != DNS_CACHE_NODATA)
return i;

/* OK, let's look for cached DNAME records. */
@@ -792,7 +792,7 @@ static DnsCacheItem *dns_cache_get_by_key_follow_cname_dname_nsec(DnsCache *c, D
return NULL;

i = hashmap_get(c->by_key, &DNS_RESOURCE_KEY_CONST(k->class, DNS_TYPE_DNAME, n));
if (i)
if (i && i->type != DNS_CACHE_NODATA)
return i;

/* Jump one label ahead */

0 comments on commit 3740146

Please sign in to comment.
You can’t perform that action at this time.