]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
Handle referral path check cases where NS is in the answer section.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Fri, 19 Jun 2009 08:55:12 +0000 (08:55 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Fri, 19 Jun 2009 08:55:12 +0000 (08:55 +0000)
git-svn-id: file:///svn/unbound/trunk@1678 be551aaa-1e26-0410-a405-d3ace91eadb9

doc/Changelog
iterator/iterator.c

index 6fdcd1c3cc16321ac25c33cd19440cf4ad3968c1..6b5cfae30d190b362ba8840b52631c91c105b752 100644 (file)
@@ -2,6 +2,7 @@
        - Fixup strict aliasing warning in iter priv code.
          and config_file code.
        - iana portlist updated.
+       - harden-referral-path: handle cases where NS is in answer section.
 
 18 June 2009: Wouter
        - Fix of message parse bug where (specifically) an NSEC and RRSIG
index 4ed06d7792f1411451acacf95dda2be015d20c8a..9095a884159fc54cba32a8a8b51c1c1a634184c9 100644 (file)
@@ -1513,9 +1513,14 @@ processQueryResponse(struct module_qstate* qstate, struct iter_qstate* iq,
                           /* we know that all other NS rrsets are scrubbed
                            * away, thus on referral only one is left.
                            * see if that equals the query name... */
-                       && reply_find_rrset_section_ns(iq->response->rep,
+                       && ( /* auth section, but sometimes in answer section*/
+                         reply_find_rrset_section_ns(iq->response->rep,
                                qstate->qinfo.qname, qstate->qinfo.qname_len,
                                LDNS_RR_TYPE_NS, qstate->qinfo.qclass)
+                         || reply_find_rrset_section_an(iq->response->rep,
+                               qstate->qinfo.qname, qstate->qinfo.qname_len,
+                               LDNS_RR_TYPE_NS, qstate->qinfo.qclass)
+                         )
                    )) {
                        /* Store the referral under the current query */
                        if(!iter_dns_store(qstate->env, &iq->response->qinfo,