]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- For #1103: fix to also drop mesh state reference when the discard
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Mon, 15 Jul 2024 12:51:20 +0000 (14:51 +0200)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Mon, 15 Jul 2024 12:51:20 +0000 (14:51 +0200)
  limit is reached, when there is an error making a new recursion
  state and when the connection is dropped with is_drop.

doc/Changelog
services/mesh.c

index 14e09ab41f602fd2421f219be1bbe3905000e437..30c267cb44c812c9c3621b9278d30048d01babfd 100644 (file)
@@ -1,3 +1,8 @@
+15 July 2024: Wouter
+       - For #1103: fix to also drop mesh state reference when the discard
+         limit is reached, when there is an error making a new recursion
+         state and when the connection is dropped with is_drop.
+
 12 July 2024: Yorgos
        - Add RPZ tag tests in acl_interface.tdir.
        - For #1102: clearer text for using interface-* options for the
index fa03c63d8a9628587cd715bf6d5439ee0762d027..a78e9dde95b1d23a8574376ac01a128fa4e6a9d5 100644 (file)
@@ -566,6 +566,8 @@ servfail_mem:
                        edns->opt_list_inplace_cb_out = NULL;
        error_encode(r_buffer, LDNS_RCODE_SERVFAIL,
                qinfo, qid, qflags, edns);
+       if(rep->c->use_h2)
+               http2_stream_remove_mesh_state(rep->c->h2_stream);
        comm_point_send_reply(rep);
        if(added)
                mesh_state_delete(&s->s);
@@ -1533,6 +1535,9 @@ void mesh_query_done(struct mesh_state* mstate)
                        infra_wait_limit_dec(mstate->s.env->infra_cache,
                                &r->query_reply, mstate->s.env->cfg);
                        mstate->reply_list = NULL;
+                       if(r->query_reply.c->use_h2)
+                               http2_stream_remove_mesh_state(
+                                       r->query_reply.c->h2_stream);
                        comm_point_drop_reply(&r->query_reply);
                        mstate->reply_list = reply_list;
                        mstate->s.env->mesh->stats_dropped++;
@@ -1565,6 +1570,10 @@ void mesh_query_done(struct mesh_state* mstate)
                        infra_wait_limit_dec(mstate->s.env->infra_cache,
                                &r->query_reply, mstate->s.env->cfg);
                        mstate->reply_list = NULL;
+                       if(r->query_reply.c->use_h2) {
+                               http2_stream_remove_mesh_state(
+                                       r->query_reply.c->h2_stream);
+                       }
                        comm_point_drop_reply(&r->query_reply);
                        mstate->reply_list = reply_list;
                } else {
@@ -2258,6 +2267,9 @@ mesh_serve_expired_callback(void* arg)
                        infra_wait_limit_dec(mstate->s.env->infra_cache,
                                &r->query_reply, mstate->s.env->cfg);
                        mstate->reply_list = NULL;
+                       if(r->query_reply.c->use_h2)
+                               http2_stream_remove_mesh_state(
+                                       r->query_reply.c->h2_stream);
                        comm_point_drop_reply(&r->query_reply);
                        mstate->reply_list = reply_list;
                        mstate->s.env->mesh->stats_dropped++;