4266. [bug] The sdlz driver failed pass some errors back to the

caller. [RT #41142]
This commit is contained in:
Mark Andrews
2015-12-02 13:17:19 +11:00
parent 04a5a82333
commit 54d655f513
2 changed files with 10 additions and 5 deletions

View File

@@ -1,6 +1,7 @@
4267. [test] Check sdlz error handling. [RT #41142]
4266. [placeholder]
4266. [bug] The sdlz driver failed pass some errors back to the
caller. [RT #41142]
4265. [bug] Address unchecked isc_mem_get calls. [RT #41187]

View File

@@ -606,7 +606,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,
@@ -614,7 +614,10 @@ findnodeext(dns_db_t *db, dns_name_t *name, isc_boolean_t create,
MAYBE_UNLOCK(sdlz->dlzimp);
if (result != ISC_R_SUCCESS && !isorigin && !create) {
if (result == ISC_R_NOTFOUND && (isorigin || create))
result = ISC_R_SUCCESS;
if (result != ISC_R_SUCCESS) {
destroynode(node);
return (result);
}
@@ -879,10 +882,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