]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix mesh state assertion failure due to callback removal.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Mon, 7 May 2018 11:29:12 +0000 (11:29 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Mon, 7 May 2018 11:29:12 +0000 (11:29 +0000)
git-svn-id: file:///svn/unbound/trunk@4681 be551aaa-1e26-0410-a405-d3ace91eadb9

doc/Changelog
services/mesh.c

index 6c9f4b24fd31c94dd40e89bad58a6b11cd2c9b17..427bd7e2941b2d325603ed71f4e2071d6cfffa9c 100644 (file)
@@ -1,6 +1,7 @@
 7 May 2018: Wouter
        - Fix windows to not have sticky TLS events for TCP.
        - Fix read of DNS over TLS length and data in one read call.
+       - Fix mesh state assertion failure due to callback removal.
 
 3 May 2018: Wouter
        - Fix that configure --with-libhiredis also turns on cachedb.
index 3027cef0090087a6cd76302bd42f6aae7fae4143..41aba74ab260765a902e34c384f68f8200597e63 100644 (file)
@@ -1173,6 +1173,10 @@ void mesh_query_done(struct mesh_state* mstate)
        while((c = mstate->cb_list) != NULL) {
                /* take this cb off the list; so that the list can be
                 * changed, eg. by adds from the callback routine */
+               if(!mstate->reply_list && mstate->cb_list && !c->next) {
+                       /* was a reply state, not anymore */
+                       mstate->s.env->mesh->num_reply_states--;
+               }
                mstate->cb_list = c->next;
                if(!mstate->reply_list && !mstate->cb_list &&
                        mstate->super_set.count == 0)