From 69f7048c89aada4fdac292d588ea1571a47adfcb Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Mon, 4 Dec 2023 13:21:20 +1100 Subject: [PATCH 1/2] Handle ISC_R_SHUTTINGDOWN in dighost.c:recv_done When dighost.c:recv_done is called with ISC_R_SHUTTINGDOWN cancel all outstanding lookups as this indicates SIGTERM was recieved. --- bin/dig/dighost.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/dig/dighost.c b/bin/dig/dighost.c index 0dd7b3a825..17c4e388d5 100644 --- a/bin/dig/dighost.c +++ b/bin/dig/dighost.c @@ -3910,7 +3910,9 @@ recv_done(isc_nmhandle_t *handle, isc_result_t eresult, isc_region_t *region, { debug("recv_done: cancel"); isc_nmhandle_detach(&query->readhandle); - if (!query->canceled) { + if (eresult == ISC_R_SHUTTINGDOWN) { + cancel_all(); + } else if (!query->canceled) { cancel_lookup(l); } query_detach(&query); From da8a269daf6cbe292cd372d45621d22010b81eae Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Mon, 4 Dec 2023 13:25:37 +1100 Subject: [PATCH 2/2] Add CHANGES note for [GL #4457] --- CHANGES | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES b/CHANGES index 98a3633e0b..06772c24e6 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +6291. [bug] SIGTERM failed to properly stop multiple outstanding + lookup in dig. [GL #4457] + 6290. [bug] Dig +yaml will now report "no servers could be reached" also for UDP setup failure when no other servers or tries are left. [GL #1229]