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

modify dns_qp_findname_ancestor() to return found name

add a 'foundname' parameter to dns_qp_findname_ancestor(),
and use it to set the found name in dns_nametree.

this required adding a dns_qpkey_toname() function; that was
done by moving qp_test_keytoname() from the test library to qp.c.
added some more test cases and fixed bugs with the handling of
relative and empty names.
This commit is contained in:
Evan Hunt
2023-09-06 23:57:42 -07:00
parent 06ac957c4f
commit 29cf7dceb7
12 changed files with 214 additions and 117 deletions

View File

@@ -181,9 +181,10 @@ dns_zt_find(dns_zt_t *zt, const dns_name_t *name, dns_ztfind_t options,
result = dns_qp_getname(&qpr, name, &pval, NULL);
} else if (exactopts == DNS_ZTFIND_NOEXACT) {
result = dns_qp_findname_ancestor(
&qpr, name, DNS_QPFIND_NOEXACT, &pval, NULL);
&qpr, name, DNS_QPFIND_NOEXACT, NULL, &pval, NULL);
} else {
result = dns_qp_findname_ancestor(&qpr, name, 0, &pval, NULL);
result = dns_qp_findname_ancestor(&qpr, name, 0, NULL, &pval,
NULL);
}
dns_qpread_destroy(zt->multi, &qpr);