From 05a91e4e4c301a11cfd4648389f0625249cde8a8 Mon Sep 17 00:00:00 2001 From: Evan Hunt Date: Thu, 15 Feb 2018 16:11:52 -0800 Subject: [PATCH] list servers that time out in dig +nssearch --- bin/dig/dighost.c | 10 +++++++++- doc/arm/notes.xml | 6 ++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/bin/dig/dighost.c b/bin/dig/dighost.c index 96ba8e44ff..508c620e67 100644 --- a/bin/dig/dighost.c +++ b/bin/dig/dighost.c @@ -2983,7 +2983,15 @@ connect_timeout(isc_task_t *task, isc_event_t *event) { check_next_lookup(l); } } else { - if (!l->ns_search_only) { + if (l->ns_search_only) { + isc_netaddr_t netaddr; + char buf[ISC_NETADDR_FORMATSIZE]; + + isc_netaddr_fromsockaddr(&netaddr, &query->sockaddr); + isc_netaddr_format(&netaddr, buf, sizeof(buf)); + + printf(";; no response from %s\n", buf); + } else { fputs(l->cmdline, stdout); printf(";; connection timed out; no servers could be " "reached\n"); diff --git a/doc/arm/notes.xml b/doc/arm/notes.xml index b8c58fed88..16cd062a38 100644 --- a/doc/arm/notes.xml +++ b/doc/arm/notes.xml @@ -108,6 +108,12 @@ [RT #43670] + + + dig +nssearch will now list name servers + that have timed out, in addition to those that respond. [GL #64] + +