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

Check that catz member zone is not a configured forward zone

When processing a catalog zone member zone make sure that there is no
configured pre-existing forward zone with that name.

Refactor the `dns_fwdtable_find()` function to not alter the
`DNS_R_PARTIALMATCH` result (coming from `dns_rbt_findname()`) into
`DNS_R_SUCCESS`, so that now the caller can differentiate partial
and exact matches. Patch the calling sites to expect and process
the new return value.
This commit is contained in:
Aram Sargsyan
2022-05-03 22:24:32 +00:00
parent 5712f97c24
commit 2aff264fb1
4 changed files with 36 additions and 20 deletions

View File

@@ -176,13 +176,8 @@ dns_fwdtable_find(dns_fwdtable_t *fwdtable, const dns_name_t *name,
REQUIRE(VALID_FWDTABLE(fwdtable));
RWLOCK(&fwdtable->rwlock, isc_rwlocktype_read);
result = dns_rbt_findname(fwdtable->table, name, 0, foundname,
(void **)forwardersp);
if (result == DNS_R_PARTIALMATCH) {
result = ISC_R_SUCCESS;
}
RWUNLOCK(&fwdtable->rwlock, isc_rwlocktype_read);
return (result);