From: W.C.A. Wijngaards Date: Wed, 3 Dec 2025 13:41:10 +0000 (+0100) Subject: - Fix http2 drop handling to clear the postpone_drop state so that X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fheads%2Fmaster;p=thirdparty%2Funbound.git - 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. --- diff --git a/doc/Changelog b/doc/Changelog index de00057f1..704424cf7 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -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. diff --git a/services/listen_dnsport.c b/services/listen_dnsport.c index f7fcca194..e6c7de98d 100644 --- a/services/listen_dnsport.c +++ b/services/listen_dnsport.c @@ -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)) { diff --git a/util/netevent.c b/util/netevent.c index aedcb5e07..2943a50d0 100644 --- a/util/netevent.c +++ b/util/netevent.c @@ -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;