diff --git a/src/auth.c b/src/auth.c index 709b8d5..cf06609 100644 --- a/src/auth.c +++ b/src/auth.c @@ -518,7 +518,8 @@ size_t answer_auth(struct dns_header *header, char *limit, size_t qlen, time_t n } while ((crecp = cache_find_by_name(crecp, name, now, F_IPV4 | F_IPV6))); } - if (!found) + /* Only supply CNAME if no record for any type is known. */ + if (nxdomain) { /* Check for possible wildcard match against *.domain return length of match, to get longest.