Fix a possible dig/host crash in "NS search" mode
When getting a SERVFAIL reply from a query, 'host' tries to start
the next query in the lookup's list (also true for 'dig +nofail').
However, when running with the '-C' switch (or +nssearch for 'dig'),
all the queries in the lookup start from the beginning, so that logic
brings to a crash because of the attempted start of the query which
was already started.
Don't start the next query in the affected code path when in +nssearch
mode.
(cherry picked from commit f6658b333e)
This commit is contained in:
@@ -4365,7 +4365,7 @@ recv_done(isc_nmhandle_t *handle, isc_result_t eresult, isc_region_t *region,
|
||||
if (l->current_query == query) {
|
||||
query_detach(&l->current_query);
|
||||
}
|
||||
if (next != NULL) {
|
||||
if (next != NULL && (!l->ns_search_only || l->trace_root)) {
|
||||
debug("sending query %p", next);
|
||||
if (l->tcp_mode) {
|
||||
start_tcp(next);
|
||||
|
||||
Reference in New Issue
Block a user