diff options
author | Simon Kelley <simon@thekelleys.org.uk> | 2017-02-19 23:07:01 +0000 |
---|---|---|
committer | Simon Kelley <simon@thekelleys.org.uk> | 2017-02-19 23:07:01 +0000 |
commit | 62f9c0d47099f46cac941ce0ea103921999d244f (patch) | |
tree | 3162a86acfdce0f608344ff9675248852d8ed1ae | |
parent | 54bb3639d4d58ebb5502874bb024745d14ba1a62 (diff) | |
download | dnsmasq-2.77test4.tar.gz |
Fix CNAME wildcard in auth-mode.v2.77test4
A domain can only have a CNAME if it has not other records.
Don't return a CNAME when there are records of other types on the name.
-rw-r--r-- | src/auth.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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. |