]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
crash fixup.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Mon, 1 Oct 2007 14:55:08 +0000 (14:55 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Mon, 1 Oct 2007 14:55:08 +0000 (14:55 +0000)
git-svn-id: file:///svn/unbound/trunk@651 be551aaa-1e26-0410-a405-d3ace91eadb9

doc/Changelog
iterator/iterator.c

index 013c1a342126f2e321742d5e3dd3896065dc565c..6ccc5ebd7bc026127ed0c1b7cc1e389bdbe751f0 100644 (file)
@@ -1,5 +1,7 @@
 1 October 2007: Wouter
        - skip F77, CXX, objC tests in configure step.
+       - fixup crash in refetch glue after a CNAME.
+         and protection against similar failures (with error print).
 
 28 September 2007: Wouter
        - test case for unbound-checkconf, fixed so it also checks the
index 462edcc638bcd44e0a2cec844cb6770d6d2773df..a424f6a3104452797413d88be96a88835ebe326a 100644 (file)
@@ -706,6 +706,10 @@ processInitRequest(struct module_qstate* qstate, struct iter_qstate* iq,
         * When re-fetching glue we also need to ask the parent.
         */
        if(iq->refetch_glue) {
+               if(!iq->dp) {
+                       log_err("internal or malloc fail: no dp for refetch");
+                       return error_response(qstate, id, LDNS_RCODE_SERVFAIL);
+               }
                delname = iq->dp->name;
                delnamelen = iq->dp->namelen;
        } else {
@@ -716,6 +720,7 @@ processInitRequest(struct module_qstate* qstate, struct iter_qstate* iq,
                && !dname_is_root(delname)) {
                /* do not adjust root label, remove first label from delname */
                dname_remove_label(&delname, &delnamelen);
+               iq->refetch_glue = 0; /* if CNAME causes restart, no refetch */
        }
        while(1) {