From e87a5e7bff70f66a1bb00445f754733302e4bf0b Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Tue, 21 May 2024 11:48:25 +1000 Subject: [PATCH 1/4] Handle ISC_R_HOSTDOWN and ISC_R_NETDOWN in resolver.c These error codes should be treated like other unreachable error codes. (cherry picked from commit 180b1e79398a7120929c413c7c0392ae15ccf69c) --- lib/dns/resolver.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/dns/resolver.c b/lib/dns/resolver.c index 60cac293cb..4fe2d908f6 100644 --- a/lib/dns/resolver.c +++ b/lib/dns/resolver.c @@ -1920,7 +1920,9 @@ resquery_senddone(isc_result_t eresult, isc_region_t *region, void *arg) { case ISC_R_SHUTTINGDOWN: break; + case ISC_R_HOSTDOWN: case ISC_R_HOSTUNREACH: + case ISC_R_NETDOWN: case ISC_R_NETUNREACH: case ISC_R_NOPERM: case ISC_R_ADDRNOTAVAIL: @@ -2994,8 +2996,10 @@ resquery_connected(isc_result_t eresult, isc_region_t *region, void *arg) { fctx_done_detach(&fctx, eresult); break; - case ISC_R_NETUNREACH: + case ISC_R_HOSTDOWN: case ISC_R_HOSTUNREACH: + case ISC_R_NETDOWN: + case ISC_R_NETUNREACH: case ISC_R_CONNREFUSED: case ISC_R_NOPERM: case ISC_R_ADDRNOTAVAIL: @@ -8175,7 +8179,9 @@ rctx_dispfail(respctx_t *rctx) { */ switch (rctx->result) { case ISC_R_EOF: + case ISC_R_HOSTDOWN: case ISC_R_HOSTUNREACH: + case ISC_R_NETDOWN: case ISC_R_NETUNREACH: case ISC_R_CONNREFUSED: case ISC_R_CONNECTIONRESET: From 99d2b4079faaa7f68b777666158e2dc8d560d3cb Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Mon, 27 May 2024 12:46:46 +1000 Subject: [PATCH 2/4] Update resquery_senddone handling of ISC_R_CONNECTIONRESET Treat connection reset as an address specific error. (cherry picked from commit 4e3dd85b8ddcb3ec7c9e7031ff844a3c4a987c53) --- lib/dns/resolver.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/dns/resolver.c b/lib/dns/resolver.c index 4fe2d908f6..1381c2dcbf 100644 --- a/lib/dns/resolver.c +++ b/lib/dns/resolver.c @@ -1927,6 +1927,7 @@ resquery_senddone(isc_result_t eresult, isc_region_t *region, void *arg) { case ISC_R_NOPERM: case ISC_R_ADDRNOTAVAIL: case ISC_R_CONNREFUSED: + case ISC_R_CONNECTIONRESET: /* No route to remote. */ FCTXTRACE3("query canceled in resquery_senddone(): " "no route to host; no response", From d3f708ba566d707afbf461b374add508e99023f3 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Mon, 27 May 2024 15:17:06 +1000 Subject: [PATCH 3/4] Update resquery_senddone handling of ISC_R_TIMEDOUT Treat timed out as an address specific error. (cherry picked from commit 56c3dcc5d779d0365b385cf393317cae18526949) --- lib/dns/resolver.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/dns/resolver.c b/lib/dns/resolver.c index 1381c2dcbf..3d4d194c31 100644 --- a/lib/dns/resolver.c +++ b/lib/dns/resolver.c @@ -1928,6 +1928,7 @@ resquery_senddone(isc_result_t eresult, isc_region_t *region, void *arg) { case ISC_R_ADDRNOTAVAIL: case ISC_R_CONNREFUSED: case ISC_R_CONNECTIONRESET: + case ISC_R_TIMEDOUT: /* No route to remote. */ FCTXTRACE3("query canceled in resquery_senddone(): " "no route to host; no response", From c22b590dc33d500c08d7cf28ff16438560d6b220 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Tue, 21 May 2024 11:52:38 +1000 Subject: [PATCH 4/4] Add CHANGES note for [GL #4736] (cherry picked from commit 71cfa8dfbaf92e76717e3149b2bf09cbfd8fc58e) --- CHANGES | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES b/CHANGES index 7129a1f280..ac9529a04a 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +6395. [bug] Handle ISC_R_HOSTDOWN and ISC_R_NETDOWN in resolver.c. + [GL #4736] + 6394. [bug] Named's -4 and -6 options now apply to zone primaries, also-notify and parental-agents. Report when a zone has these options configured but does not have an IPv4