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

4533. [bug] dns_client_update should terminate on prerequiste

failures (NXDOMAIN, YXDOMAIN, NXRRSET, YXRRSET)
                        and also on BADZONE.  [RT #43865]
This commit is contained in:
Mark Andrews
2016-12-13 15:47:03 +11:00
parent 4914e3ddc6
commit 8ca45ba01a
11 changed files with 188 additions and 70 deletions

View File

@@ -1978,8 +1978,21 @@ update_done(isc_task_t *task, isc_event_t *event) {
LOCK(&uctx->lock);
uctx->currentserver = ISC_LIST_NEXT(uctx->currentserver, link);
dns_request_destroy(&uctx->updatereq);
if (result != ISC_R_SUCCESS && !uctx->canceled &&
uctx->currentserver != NULL) {
/*
* Moving on to the next server shouldn't change the result
* for NXDOMAIN, YXDOMAIN, NXRRSET and YXRRSET as they
* indicate a prerequisite failure. REFUSED should also
* be consistent across all servers but often isn't as that
* is policy rather that zone content driven (slaves that
* aren't willing to forward should return NOTIMPL). NOTZONE
* indicates that we stuffed up the request construction so
* don't retry.
*/
if (result != ISC_R_SUCCESS && result != DNS_R_NXDOMAIN &&
result != DNS_R_YXDOMAIN && result != DNS_R_YXRRSET &&
result != DNS_R_NXRRSET && result != DNS_R_NOTZONE &&
!uctx->canceled && uctx->currentserver != NULL)
{
dns_message_renderreset(uctx->updatemsg);
dns_message_settsigkey(uctx->updatemsg, NULL);