mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-09 01:42:07 -04:00
Fix following up lookup failure if more resolvers are available
_query_detach function was incorrectly unliking the query object from the lookup->q query list, this made it impossible to follow a query lookup failure with the next one in the list (possibly using a separate resolver), as the link to the next query in the list was dissolved. Fix by unliking the node only when the query object is about to be destroyed, i.e. there is no more references to the object.
This commit is contained in:
parent
3793733704
commit
4d6408b823
1 changed files with 3 additions and 4 deletions
|
|
@ -1692,14 +1692,13 @@ _query_detach(dig_query_t **queryp, const char *file, unsigned int line) {
|
|||
query_detach(&lookup->current_query);
|
||||
}
|
||||
|
||||
if (ISC_LINK_LINKED(query, link)) {
|
||||
ISC_LIST_UNLINK(lookup->q, query, link);
|
||||
}
|
||||
|
||||
debug("%s:%u:query_detach(%p) = %" PRIuFAST32, file, line, query,
|
||||
isc_refcount_current(&query->references) - 1);
|
||||
|
||||
if (isc_refcount_decrement(&query->references) == 1) {
|
||||
if (ISC_LINK_LINKED(query, link)) {
|
||||
ISC_LIST_UNLINK(lookup->q, query, link);
|
||||
}
|
||||
destroy_query(query, file, line);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue