mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-10 17:50:00 -04:00
Handle address lookup failure more gracefully
If the address lookup of the primary server fails just abort the current update request rather than calling exit. This allows nsupdate to cleanup gracefully.
This commit is contained in:
parent
fa21157bc1
commit
f1387514c6
1 changed files with 9 additions and 2 deletions
|
|
@ -2797,8 +2797,8 @@ recvsoa(isc_task_t *task, isc_event_t *event) {
|
|||
dns_request_destroy(&request);
|
||||
dns_message_detach(&soaquery);
|
||||
ddebug("Out of recvsoa");
|
||||
done_update();
|
||||
seenerror = true;
|
||||
done_update();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -2903,7 +2903,14 @@ lookforsoa:
|
|||
primary_total = get_addresses(serverstr, dnsport,
|
||||
primary_servers, primary_alloc);
|
||||
if (primary_total == 0) {
|
||||
exit(1);
|
||||
seenerror = true;
|
||||
dns_rdata_freestruct(&soa);
|
||||
dns_message_detach(&soaquery);
|
||||
dns_request_destroy(&request);
|
||||
dns_message_detach(&rcvmsg);
|
||||
ddebug("Out of recvsoa");
|
||||
done_update();
|
||||
return;
|
||||
}
|
||||
primary_inuse = 0;
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue