--- dighost.c.orig 2011-03-11 07:46:58.000000000 +0100
+++ dighost.c 2011-10-28 14:31:29.806591603 +0200
@@ -2619,8 +2619,13 @@ connect_timeout(isc_task_t *task, isc_ev
}
} else {
fputs(l->cmdline, stdout);
- printf(";; connection timed out; no servers could be "
- "reached\n");
+ if (!next_origin(NULL, query)) {
+ printf(";; connection timed out; no servers could be "
+ "reached\n");
+ } else {
+ printf(";; connection timed out; trying next "
+ "origin\n");
+ }
cancel_lookup(l);
check_next_lookup(l);
if (exitcode < 9)
@@ -3270,7 +3275,8 @@ recv_done(isc_task_t *task, isc_event_t
return;
}
if ((msg->rcode == dns_rcode_servfail && !l->servfail_stops) ||
- (check_ra && (msg->flags & DNS_MESSAGEFLAG_RA) == 0 && l->recurse))
+ (check_ra && (msg->flags & DNS_MESSAGEFLAG_RA) == 0 &&
+ msg->rcode != dns_rcode_noerror && l->recurse))
{
dig_query_t *next = ISC_LIST_NEXT(query, link);
if (l->current_query == query)