2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 22:15:20 +00:00

[master] DLZ fixes

- handle malformed answers from DLZ better:
 - handle dlz_lookup errors better:
   when the first lookup of a name returns an unexpected failure code,
   we return it to the caller rather than continuing on to look up
   the wildcard. we now only continue processing if the return from
   the first lookup was either ISC_R_SUCCESS or ISC_R_NOTFOUND.

 - improved backward-compatibility for dlz_version:
   added a DLZ_DLOPEN_AGE value indicating how many versions
   back from the current DLZ_DLOPEN_VERSION named will support
This commit is contained in:
Evan Hunt
2013-01-22 15:13:08 -08:00
parent 0a8a14d513
commit cbd1fa092e
8 changed files with 55 additions and 15 deletions

View File

@@ -605,7 +605,7 @@ findnodeext(dns_db_t *db, dns_name_t *name, isc_boolean_t create,
* if the host (namestr) was not found, try to lookup a
* "wildcard" host.
*/
if (result != ISC_R_SUCCESS && !create)
if (result == ISC_R_NOTFOUND && !create)
result = sdlz->dlzimp->methods->lookup(zonestr, "*",
sdlz->dlzimp->driverarg,
sdlz->dbdata, node,
@@ -878,10 +878,11 @@ findext(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version,
dns_name_getlabelsequence(name, nlabels - i, i, xname);
result = findnodeext(db, xname, ISC_FALSE,
methods, clientinfo, &node);
if (result != ISC_R_SUCCESS) {
if (result == ISC_R_NOTFOUND) {
result = DNS_R_NXDOMAIN;
continue;
}
} else if (result != ISC_R_SUCCESS)
break;
/*
* Look for a DNAME at the current label, unless this is