]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Fix a possible hang in dig if a send is interrupted/canceled
authorAram Sargsyan <aram@isc.org>
Tue, 1 Jul 2025 10:49:39 +0000 (10:49 +0000)
committerArаm Sаrgsyаn <aram@isc.org>
Thu, 10 Jul 2025 11:16:45 +0000 (11:16 +0000)
When send_done() is called with a ISC_R_CANCELED status (e.g. because
of a signal from ctrl+c), dig can fail to shutdown because
check_if_done() is not called in the branch. Add a check_if_done()
call.

bin/dig/dighost.c

index c2e9b5488618c8987bdd09b2aa1342bb6fb92a2b..2c4335c5123e7c844fc98d1f29097f27b7f1dfb9 100644 (file)
@@ -2697,6 +2697,7 @@ send_done(isc_nmhandle_t *handle, isc_result_t eresult, void *arg) {
                }
                query_detach(&query);
                lookup_detach(&l);
+               check_if_done();
                return;
        } else if (eresult != ISC_R_SUCCESS) {
                debug("send failed: %s", isc_result_totext(eresult));