From 180b1e79398a7120929c413c7c0392ae15ccf69c 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. --- 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 fd5cc04be1..1d899910b3 100644 --- a/lib/dns/resolver.c +++ b/lib/dns/resolver.c @@ -1752,7 +1752,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: @@ -2829,8 +2831,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: @@ -7756,7 +7760,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 4e3dd85b8ddcb3ec7c9e7031ff844a3c4a987c53 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. --- lib/dns/resolver.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/dns/resolver.c b/lib/dns/resolver.c index 1d899910b3..b67aa57e0d 100644 --- a/lib/dns/resolver.c +++ b/lib/dns/resolver.c @@ -1759,6 +1759,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 56c3dcc5d779d0365b385cf393317cae18526949 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. --- lib/dns/resolver.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/dns/resolver.c b/lib/dns/resolver.c index b67aa57e0d..f984dbef67 100644 --- a/lib/dns/resolver.c +++ b/lib/dns/resolver.c @@ -1760,6 +1760,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 71cfa8dfbaf92e76717e3149b2bf09cbfd8fc58e 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] --- CHANGES | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES b/CHANGES index 56da1cf2d1..c76567bcab 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