]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Handle ISC_R_SHUTTINGDOWN in dighost.c:tcp_connected
authorMark Andrews <marka@isc.org>
Thu, 7 Dec 2023 02:36:46 +0000 (13:36 +1100)
committerMark Andrews <marka@isc.org>
Mon, 18 Dec 2023 22:43:15 +0000 (09:43 +1100)
dig was making further queries after SIGINT was recieved rather
than shutting down as expected.

bin/dig/dighost.c

index e5cd294e221f061119dee5156833d48d5d35e660..6f06f62389f26470825f16f264d6f96f5bb92bdb 100644 (file)
@@ -3566,6 +3566,12 @@ tcp_connected(isc_nmhandle_t *handle, isc_result_t eresult, void *arg) {
        debug("tcp_connected(%p, %s, %p)", handle, isc_result_totext(eresult),
              query);
 
+       if (eresult == ISC_R_SHUTTINGDOWN) {
+               query_detach(&query);
+               cancel_all();
+               return;
+       }
+
        lookup_attach(query->lookup, &l);
 
        if (eresult == ISC_R_CANCELED || eresult == ISC_R_TLSBADPEERCERT ||