mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 18:28:25 +00:00
Fix CNAME wildcard in auth-mode.
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.
This commit is contained in:
@@ -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)));
|
} 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
|
/* Check for possible wildcard match against *.domain
|
||||||
return length of match, to get longest.
|
return length of match, to get longest.
|
||||||
|
|||||||
Reference in New Issue
Block a user