mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-01 15:05:23 +00:00
Revert "qpzone find() function could set foundname incorrectly"
This reverts commit dd1050e938
.
This commit is contained in:
@@ -3365,8 +3365,10 @@ find(dns_db_t *db, const dns_name_t *name, dns_dbversion_t *version,
|
|||||||
if (tresult != DNS_R_CONTINUE) {
|
if (tresult != DNS_R_CONTINUE) {
|
||||||
result = tresult;
|
result = tresult;
|
||||||
search.chain.len = i - 1;
|
search.chain.len = i - 1;
|
||||||
dns_name_copy(&n->name, foundname);
|
|
||||||
node = n;
|
node = n;
|
||||||
|
if (foundname != NULL) {
|
||||||
|
dns_name_copy(&node->name, foundname);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3635,20 +3637,12 @@ found:
|
|||||||
/*
|
/*
|
||||||
* We have an exact match for the name, but there are no
|
* We have an exact match for the name, but there are no
|
||||||
* active rdatasets in the desired version. That means that
|
* active rdatasets in the desired version. That means that
|
||||||
* this node doesn't exist in the desired version.
|
* this node doesn't exist in the desired version, and that
|
||||||
* If there's a node above this one, reassign the
|
* we really have a partial match.
|
||||||
* foundname to the parent and treat this as a partial
|
|
||||||
* match.
|
|
||||||
*/
|
*/
|
||||||
if (!wild) {
|
if (!wild) {
|
||||||
unsigned int len = search.chain.len - 1;
|
NODE_UNLOCK(nlock, &nlocktype);
|
||||||
if (len > 0) {
|
goto partial_match;
|
||||||
NODE_UNLOCK(nlock, &nlocktype);
|
|
||||||
dns_qpchain_node(&search.chain, len - 1, NULL,
|
|
||||||
(void **)&node, NULL);
|
|
||||||
dns_name_copy(&node->name, foundname);
|
|
||||||
goto partial_match;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user