mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-10 11:20:00 -04:00
Merge branch '4508-crash-in-host-9.18' into 'bind-9.18'
[9.18] Fix a possible dig/host crash in "NS search" mode See merge request isc-projects/bind9!8643
This commit is contained in:
commit
59c0e44d30
2 changed files with 15 additions and 8 deletions
4
CHANGES
4
CHANGES
|
|
@ -1,3 +1,7 @@
|
|||
6320. [bug] Fix a possible crash in 'dig +nssearch +nofail' and
|
||||
'host -C' commands when one of the name servers returns
|
||||
SERVFAIL. [GL #4508]
|
||||
|
||||
6312. [bug] Conversion from NSEC3 signed to NSEC signed could
|
||||
temporarily put the zone into a state where it was
|
||||
treated as unsigned until the NSEC chain was built.
|
||||
|
|
|
|||
|
|
@ -4361,29 +4361,32 @@ recv_done(isc_nmhandle_t *handle, isc_result_t eresult, isc_region_t *region,
|
|||
if ((msg->rcode == dns_rcode_servfail && !l->servfail_stops) ||
|
||||
(check_ra && (msg->flags & DNS_MESSAGEFLAG_RA) == 0 && l->recurse))
|
||||
{
|
||||
const char *err = (msg->rcode == dns_rcode_servfail &&
|
||||
!l->servfail_stops)
|
||||
? "SERVFAIL reply"
|
||||
: "recursion not available";
|
||||
dig_query_t *next = ISC_LIST_NEXT(query, link);
|
||||
if (l->current_query == query) {
|
||||
query_detach(&l->current_query);
|
||||
}
|
||||
if (next != NULL) {
|
||||
if (next != NULL && (!l->ns_search_only || l->trace_root)) {
|
||||
dighost_comments(l,
|
||||
"Got %s from %s, trying next server",
|
||||
err, query->servname);
|
||||
debug("sending query %p", next);
|
||||
if (l->tcp_mode) {
|
||||
start_tcp(next);
|
||||
} else {
|
||||
start_udp(next);
|
||||
}
|
||||
dighost_comments(l,
|
||||
"Got %s from %s, trying next "
|
||||
"server",
|
||||
msg->rcode == dns_rcode_servfail
|
||||
? "SERVFAIL reply"
|
||||
: "recursion not available",
|
||||
query->servname);
|
||||
if (check_if_queries_done(l, query)) {
|
||||
goto cancel_lookup;
|
||||
}
|
||||
|
||||
goto detach_query;
|
||||
} else {
|
||||
dighost_comments(l, "Got %s from %s", err,
|
||||
query->servname);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue