]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix http2 drop handling to clear the postpone_drop state so that master
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Wed, 3 Dec 2025 13:41:10 +0000 (14:41 +0100)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Wed, 3 Dec 2025 13:41:10 +0000 (14:41 +0100)
  other streams on the http2 session are not affected by a drop,
  and can clean up properly if also dropped. Fix http2 send reply
  so that when there is a send failure is does not recurse into
  the mesh functions and also does not drop the connection due to
  the condition of one stream.

doc/Changelog
services/listen_dnsport.c
util/netevent.c

index de00057f1815cbe33d43a5f7663724634c29a00a..704424cf74783898b008dcfdcac99bc52da2ca15 100644 (file)
@@ -1,3 +1,11 @@
+3 December 2025: Wouter
+       - Fix http2 drop handling to clear the postpone_drop state so that
+         other streams on the http2 session are not affected by a drop,
+         and can clean up properly if also dropped. Fix http2 send reply
+         so that when there is a send failure is does not recurse into
+         the mesh functions and also does not drop the connection due to
+         the condition of one stream.
+
 2 December 2025: Wouter
        - Fix to remove http2 stream mesh state when mesh new request is
          dropping the new request.
index f7fcca194b4052cf618e0e2344476bc657b095eb..e6c7de98d11547d6aba49111f2b365e6f7331276 100644 (file)
@@ -2884,6 +2884,7 @@ submit_http_error:
        sldns_buffer_flip(h2_stream->qbuffer);
        h2_session->postpone_drop = 1;
        query_read_done = http2_query_read_done(h2_session, h2_stream);
+       h2_session->postpone_drop = 0;
        if(query_read_done < 0)
                return NGHTTP2_ERR_CALLBACK_FAILURE;
        else if(!query_read_done) {
@@ -2893,11 +2894,9 @@ submit_http_error:
                         * failure will result in reclaiming (and closing)
                         * of comm point. */
                        verbose(VERB_QUERY, "http2 query dropped in worker cb");
-                       h2_session->postpone_drop = 0;
                        return NGHTTP2_ERR_CALLBACK_FAILURE;
                }
                /* nothing to submit right now, query added to mesh. */
-               h2_session->postpone_drop = 0;
                return 0;
        }
        if(!http2_submit_dns_response(h2_session)) {
index aedcb5e07a3028809dba2dcb0dd2522ec4a4878c..2943a50d0c20ab8668a26490e54bf8c996aa3fe0 100644 (file)
@@ -6728,7 +6728,6 @@ comm_point_send_reply(struct comm_reply *repinfo)
                        tcp_req_info_send_reply(repinfo->c->tcp_req_info);
                } else if(repinfo->c->use_h2) {
                        if(!http2_submit_dns_response(repinfo->c->h2_session)) {
-                               comm_point_drop_reply(repinfo);
                                return;
                        }
                        repinfo->c->h2_stream = NULL;