mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-01 15:05:23 +00:00
Return LWRES_R_NOTFOUND if a gnba lookup fails because the name isn't found.
This commit is contained in:
@@ -39,6 +39,7 @@ byaddr_done(isc_task_t *task, isc_event_t *event) {
|
|||||||
lwres_buffer_t lwb;
|
lwres_buffer_t lwb;
|
||||||
dns_name_t *name;
|
dns_name_t *name;
|
||||||
isc_result_t result;
|
isc_result_t result;
|
||||||
|
lwres_result_t lwresult;
|
||||||
isc_region_t r;
|
isc_region_t r;
|
||||||
isc_buffer_t b;
|
isc_buffer_t b;
|
||||||
lwres_gnbaresponse_t *gnba;
|
lwres_gnbaresponse_t *gnba;
|
||||||
@@ -67,14 +68,21 @@ byaddr_done(isc_task_t *task, isc_event_t *event) {
|
|||||||
/*
|
/*
|
||||||
* Were we trying bitstring or nibble mode? If bitstring,
|
* Were we trying bitstring or nibble mode? If bitstring,
|
||||||
* and we got FORMERROR or SERVFAIL, set the flag to
|
* and we got FORMERROR or SERVFAIL, set the flag to
|
||||||
* avoid bitstring lables for 10 minutes. If we got any
|
* avoid bitstring labels for 10 minutes. If we got any
|
||||||
* other error (NXDOMAIN, etc) just try again without
|
* other error (NXDOMAIN, etc) just try again without
|
||||||
* bitstrings, and let our cache handle the negative answer
|
* bitstrings, and let our cache handle the negative answer
|
||||||
* for bitstrings.
|
* for bitstrings.
|
||||||
*/
|
*/
|
||||||
if ((client->options & DNS_BYADDROPT_IPV6NIBBLE) != 0) {
|
if ((client->options & DNS_BYADDROPT_IPV6NIBBLE) != 0) {
|
||||||
dns_adb_freeaddrinfo(cm->view->adb, &client->addrinfo);
|
dns_adb_freeaddrinfo(cm->view->adb, &client->addrinfo);
|
||||||
ns_lwdclient_errorpktsend(client, LWRES_R_FAILURE);
|
if (result == DNS_R_NCACHENXDOMAIN ||
|
||||||
|
result == DNS_R_NCACHENXRRSET ||
|
||||||
|
result == DNS_R_NXDOMAIN ||
|
||||||
|
result == DNS_R_NXRRSET)
|
||||||
|
lwresult = LWRES_R_NOTFOUND;
|
||||||
|
else
|
||||||
|
lwresult = LWRES_R_FAILURE;
|
||||||
|
ns_lwdclient_errorpktsend(client, lwresult);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user