]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
Fixup assertion that no longer holds (since the new DoS prevention code jostles out...
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 26 May 2009 14:42:14 +0000 (14:42 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 26 May 2009 14:42:14 +0000 (14:42 +0000)
git-svn-id: file:///svn/unbound/trunk@1623 be551aaa-1e26-0410-a405-d3ace91eadb9

doc/Changelog
iterator/iterator.c
winrc/win_svc.c

index fd436834b6919a1a016a5aa4a145dcbe9441dd93..ac25ecdb4e83024368cc373ef8235cdeaa9f3d50 100644 (file)
@@ -1,3 +1,7 @@
+26 May 2009: Wouter
+       - Thanks again to Brett Carr, found an assertion that was not true.
+         Assertion checked if recursion parent query still existed.
+
 29 April 2009: Wouter
        - Thanks to Brett Carr, caught windows resource leak, use 
          closesocket() and not close() on sockets or else the network stack
index ff14b7f0d46217e28ad283b2f0563106b82c6d2c..d69d22f7b7844a6466676d918933f0ab38ac0f71 100644 (file)
@@ -1707,6 +1707,9 @@ processPrimeResponse(struct module_qstate* qstate, int id)
        struct iter_qstate* iq = (struct iter_qstate*)qstate->minfo[id];
        enum response_type type = response_type_from_server(0, iq->response, 
                &iq->qchase, iq->dp);
+       /* @@@ DEBUG - fail to prime roots often */
+       /* if((ub_random(qstate->env->rnd) & 0x7) != 0)
+               type = RESPONSE_TYPE_ANSWER+1; */
        if(type == RESPONSE_TYPE_ANSWER) {
                qstate->return_rcode = LDNS_RCODE_NOERROR;
                qstate->return_msg = iq->response;
@@ -1766,16 +1769,15 @@ processTargetResponse(struct module_qstate* qstate, int id,
        log_query_info(VERB_ALGO, "processTargetResponse super", &forq->qinfo);
 
        /* check to see if parent event is still interested (in orig name).  */
+       if(!foriq->dp)
+               return; /* not interested anymore */
        dpns = delegpt_find_ns(foriq->dp, qstate->qinfo.qname,
                        qstate->qinfo.qname_len);
        if(!dpns) {
-               /* FIXME: maybe store this nameserver address in the cache
-                * anyways? */
-               /* If not, just stop processing this event */
+               /* If not interested, just stop processing this event */
                verbose(VERB_ALGO, "subq: parent not interested anymore");
-               /* this is an error, and will cause parent to be reactivated
-                * even though nothing has happened */
-               log_assert(0);
+               /* could be because parent was jostled out of the cache,
+                  and a new identical query arrived, that does not want it*/
                return;
        }
 
index 4b7e02aed93dec81a4974fe47a2390e048fd3a95..097695cf734702dd348ee61347bea094ce6138fc 100644 (file)
@@ -422,6 +422,7 @@ void
 worker_win_stop_cb(int ATTR_UNUSED(fd), short ATTR_UNUSED(ev), void* arg)
 {
         struct worker* worker = (struct worker*)arg;
+       verbosity = 5; /* @@@ DEBUG */
         verbose(VERB_QUERY, "caught stop signal (wsaevent)");
         worker->need_to_exit = 1;
         comm_base_exit(worker->base);