2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

Fix an issue in dig when retrying with the next server after SERVFAIL

After a query results in a SERVFAIL result, and there is another
registered query in the lookup's queries list, `dig` starts the next
query to try another server, but for some reason, reports about that
also when the current query is in the head of the list, even if there
is no other query in the list to try.

Use the same condition for both decisions, and after starting the next
query, jump to the "detach_query" label instead of "next_lookup",
because there is no need to start the next lookup after we just started
a query in the current lookup.
This commit is contained in:
Aram Sargsyan
2022-03-10 17:30:34 +00:00
parent 99906df09e
commit e888c62fbd

View File

@@ -3923,15 +3923,6 @@ recv_done(isc_nmhandle_t *handle, isc_result_t eresult, isc_region_t *region,
} else {
start_udp(next);
}
}
/*
* If our query is at the head of the list and there
* is no next, we're the only one left, so fall
* through to print the message.
*/
if ((ISC_LIST_HEAD(l->q) != query) ||
(ISC_LIST_NEXT(query, link) != NULL)) {
dighost_comments(l,
"Got %s from %s, trying next "
"server",
@@ -3939,7 +3930,7 @@ recv_done(isc_nmhandle_t *handle, isc_result_t eresult, isc_region_t *region,
? "SERVFAIL reply"
: "recursion not available",
query->servname);
goto next_lookup;
goto detach_query;
}
}