Commit 45cca585 authored by Simon Kelley's avatar Simon Kelley

Fix caching of dangling CNAMEs.

parent e136725c
......@@ -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
......
......@@ -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 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment