You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
870 B
31 lines
870 B
diff --git a/lib/dns/resolver.c b/lib/dns/resolver.c |
|
index 9ad5f81..ffdde5e 100644 |
|
--- a/lib/dns/resolver.c |
|
+++ b/lib/dns/resolver.c |
|
@@ -6229,15 +6229,19 @@ answer_response(fetchctx_t *fctx) { |
|
* a CNAME or DNAME). |
|
*/ |
|
INSIST(!external); |
|
- if ((rdataset->type != |
|
- dns_rdatatype_cname) || |
|
- !found_dname || |
|
- (aflag == |
|
- DNS_RDATASETATTR_ANSWER)) |
|
+ /* |
|
+ * Don't use found_cname here |
|
+ * as we have just set it |
|
+ * above. |
|
+ */ |
|
+ if (cname == NULL && |
|
+ !found_dname && |
|
+ aflag == |
|
+ DNS_RDATASETATTR_ANSWER) |
|
{ |
|
have_answer = ISC_TRUE; |
|
- if (rdataset->type == |
|
- dns_rdatatype_cname) |
|
+ if (found_cname && |
|
+ cname == NULL) |
|
cname = name; |
|
name->attributes |= |
|
DNS_NAMEATTR_ANSWER;
|
|
|