Fix caching of dangling CNAMEs.

This commit is contained in:
Simon Kelley
2013-10-15 10:20:13 +01:00
parent e136725c5b
commit 45cca58592
2 changed files with 74 additions and 74 deletions

View File

@@ -149,6 +149,9 @@ version 2.67
no address, and vice-versa. Thanks to Yury Konovalov for
spotting the problem.
Do a better job caching dangling CNAMEs. Thanks to Yves
Dorfsman for spotting the problem.
version 2.66
Add the ability to act as an authoritative DNS

View File

@@ -1011,8 +1011,6 @@ int extract_addresses(struct dns_header *header, size_t qlen, char *name, time_t
else
continue;
if (!(flags & F_NXDOMAIN))
{
cname_loop1:
if (!(p1 = skip_questions(header, qlen)))
return 0;
@@ -1058,7 +1056,7 @@ int extract_addresses(struct dns_header *header, size_t qlen, char *name, time_t
return 0;
goto cname_loop1;
}
else
else if (!(flags & F_NXDOMAIN))
{
found = 1;
@@ -1096,7 +1094,6 @@ int extract_addresses(struct dns_header *header, size_t qlen, char *name, time_t
if (!CHECK_LEN(header, p1, qlen, 0))
return 0; /* bad packet */
}
}
if (!found && !option_bool(OPT_NO_NEG))
{
@@ -2035,7 +2032,7 @@ size_t answer_request(struct dns_header *header, char *limit, size_t qlen,
if (trunc)
header->hb3 |= HB3_TC;
if (anscount == 0 && nxdomain)
if (nxdomain)
SET_RCODE(header, NXDOMAIN);
else
SET_RCODE(header, NOERROR); /* no error */