Commit dd588db5 authored by Pekka Pessi's avatar Pekka Pessi

s2dns.c: return CNAME as answer

Ignore-this: 1beaf31e2a72f2841a097a8d2dea317

Previously, CNAME was returned as an extra record, not as an answer.

darcs-hash:20090623145955-db55f-4b051ae6cae8aa60f2f8a3a9db026094ff259c83.gz
parent d8d3b16e
......@@ -600,7 +600,9 @@ void s2_dns_record(
atype = va_arg(va, unsigned);
if (atype == qtype)
if (arcount == 0 &&
(atype == qtype || atype == sres_type_cname) &&
strcmp(qdomain, domain) == 0)
ancount++;
else
arcount++;
......@@ -663,4 +665,3 @@ void s2_dns_record(
va_end(va);
}
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