}
#endif
+ /* Work around servers sending back CNAME with different delegation and no AA. */
+ const knot_pktsection_t *an = knot_pkt_section(pkt, KNOT_ANSWER);
+ if (an->count > 0 && ns->count > 0) {
+ const knot_rrset_t *rr = knot_pkt_rr(an, 0);
+ if (rr->type == KNOT_RRTYPE_CNAME) {
+ return KNOT_STATE_CONSUME;
+ }
+ }
+
/* Update zone cut information. */
for (unsigned i = 0; i < ns->count; ++i) {
const knot_rrset_t *rr = knot_pkt_rr(ns, i);
}
}
- /* Work around servers sending back CNAME with different delegation and no AA. */
- const knot_pktsection_t *an = knot_pkt_section(pkt, KNOT_ANSWER);
- if (result == KNOT_STATE_DONE && an->count > 0) {
- const knot_rrset_t *rr = knot_pkt_rr(an, 0);
- if (rr->type == KNOT_RRTYPE_CNAME) {
- DEBUG_MSG("<= different delegation, but has a CNAME answer\n");
- result = KNOT_STATE_CONSUME;
- }
- }
-
/* CONSUME => Unhelpful referral.
* DONE => Zone cut updated. */
return result;
SECTION QUESTION
example.com. IN NS
SECTION ANSWER
-example.com. IN CNAME nowhere.
+example.com. IN CNAME nowhere.cdn.example.com.
SECTION AUTHORITY
-com. IN NS a.gtld-servers.net.
+; Suggest authority of 'nowhere' (which must not be followed)
+cdn.example.com. IN NS ns01.cdn.example.com.
+SECTION ADDITIONAL
+ns01.cdn.example.com. IN A 1.1.1.1
ENTRY_END
ENTRY_BEGIN