mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-28 04:34:54 -04:00
rename DNS_DBFIND_NOEXACT to DNS_DBFIND_ABOVE
The `DNS_DBFIND_NOEXACT` flag name is ambiguous, as it does not clearly indicate the lookup behavior (e.g., sibling, child, or parent). Rename it to `DNS_DBFIND_ABOVE` to better reflect that the lookup targets a closer ancestor name.
This commit is contained in:
parent
ec024735df
commit
1d10e4513f
6 changed files with 11 additions and 11 deletions
|
|
@ -295,7 +295,7 @@ dns__deleg_lookup(dns_delegdb_t *delegdb, dns_qpread_t *qpr,
|
|||
isc_stdtime_t now = optnow > 0 ? optnow : isc_stdtime_now();
|
||||
|
||||
dns_qpchain_t chain = {};
|
||||
bool noexact = (options & DNS_DBFIND_NOEXACT) != 0;
|
||||
bool above = (options & DNS_DBFIND_ABOVE) != 0;
|
||||
|
||||
REQUIRE(VALID_DELEGDB(delegdb));
|
||||
REQUIRE(DNS_NAME_VALID(name));
|
||||
|
|
@ -316,7 +316,7 @@ dns__deleg_lookup(dns_delegdb_t *delegdb, dns_qpread_t *qpr,
|
|||
|
||||
/*
|
||||
* Walk up the chain when:
|
||||
* - we have an exact match but the caller asked for NOEXACT
|
||||
* - we have an exact match but the caller asked for DNS_DBFIND_ABOVE
|
||||
* (i.e. the caller wants the deepest *proper* ancestor), or
|
||||
* - the matched node is no longer active and we need to fall
|
||||
* back to the closest still-active ancestor (this applies
|
||||
|
|
@ -326,7 +326,7 @@ dns__deleg_lookup(dns_delegdb_t *delegdb, dns_qpread_t *qpr,
|
|||
* exists in the chain, so we must NULL-check before dereferencing
|
||||
* 'node' below.
|
||||
*/
|
||||
if ((result == ISC_R_SUCCESS && noexact) || !isactive(node, now)) {
|
||||
if ((result == ISC_R_SUCCESS && above) || !isactive(node, now)) {
|
||||
getparentnode(&chain, &node, now);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -251,7 +251,7 @@ enum {
|
|||
DNS_DBFIND_GLUEOK = 1 << 0,
|
||||
DNS_DBFIND_NOWILD = 1 << 1,
|
||||
DNS_DBFIND_PENDINGOK = 1 << 2,
|
||||
DNS_DBFIND_NOEXACT = 1 << 3,
|
||||
DNS_DBFIND_ABOVE = 1 << 3,
|
||||
DNS_DBFIND_COVERINGNSEC = 1 << 4,
|
||||
DNS_DBFIND_FORCENSEC3 = 1 << 5,
|
||||
DNS_DBFIND_ADDITIONALOK = 1 << 6,
|
||||
|
|
|
|||
|
|
@ -711,7 +711,7 @@ dns_view_bestzonecut(dns_view_t *view, const dns_name_t *name,
|
|||
*\li If 'use_cache' is true, and the view has a cache, then it will be
|
||||
* searched.
|
||||
*
|
||||
*\li If the DNS_DBFIND_NOEXACT option is set, then the zonecut returned
|
||||
*\li If the DNS_DBFIND_ABOVE option is set, then the zonecut returned
|
||||
* (if any) will be the deepest known ancestor of 'name'.
|
||||
*
|
||||
*\li If dcname is not NULL the deepest cached name is copied to it.
|
||||
|
|
|
|||
|
|
@ -4626,7 +4626,7 @@ resume_qmin(void *arg) {
|
|||
dns_delegset_detach(&fctx->delegset);
|
||||
|
||||
if (dns_rdatatype_atparent(fctx->type)) {
|
||||
findoptions |= DNS_DBFIND_NOEXACT;
|
||||
findoptions |= DNS_DBFIND_ABOVE;
|
||||
}
|
||||
result = dns_view_bestzonecut(res->view, fctx->name, fname, dcname,
|
||||
fctx->now, findoptions, true, true,
|
||||
|
|
@ -5064,7 +5064,7 @@ fctx__create(dns_resolver_t *res, isc_loop_t *loop, const dns_name_t *name,
|
|||
* mode, so find the best nameservers to use.
|
||||
*/
|
||||
if (dns_rdatatype_atparent(fctx->type)) {
|
||||
findoptions |= DNS_DBFIND_NOEXACT;
|
||||
findoptions |= DNS_DBFIND_ABOVE;
|
||||
}
|
||||
result = dns_view_bestzonecut(
|
||||
res->view, name, fctx->fwdname, dcname,
|
||||
|
|
@ -9372,7 +9372,7 @@ rctx_nextserver(respctx_t *rctx, dns_message_t *message,
|
|||
return;
|
||||
}
|
||||
if (dns_rdatatype_atparent(fctx->type)) {
|
||||
findoptions |= DNS_DBFIND_NOEXACT;
|
||||
findoptions |= DNS_DBFIND_ABOVE;
|
||||
}
|
||||
/* FIXME: Why??? */
|
||||
if ((rctx->retryopts & DNS_FETCHOPT_UNSHARED) == 0) {
|
||||
|
|
|
|||
|
|
@ -997,7 +997,7 @@ bestzonecut_zone(dns_view_t *view, const dns_name_t *name, dns_name_t *fname,
|
|||
unsigned int ztoptions = DNS_ZTFIND_MIRROR;
|
||||
isc_result_t result;
|
||||
|
||||
if ((options & DNS_DBFIND_NOEXACT) != 0) {
|
||||
if ((options & DNS_DBFIND_ABOVE) != 0) {
|
||||
ztoptions |= DNS_ZTFIND_NOEXACT;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -448,8 +448,8 @@ noexacttests(ISC_ATTR_UNUSED void *arg) {
|
|||
dns_delegset_detach(&delegset);
|
||||
|
||||
result = lookupdb(db, zonecuts[i].name, now + 1,
|
||||
DNS_DBFIND_NOEXACT,
|
||||
zonecuts[i].noexactexpected, &delegset);
|
||||
DNS_DBFIND_ABOVE, zonecuts[i].noexactexpected,
|
||||
&delegset);
|
||||
assert_int_equal(result, zonecuts[i].noexactresult);
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
dns_delegset_detach(&delegset);
|
||||
|
|
|
|||
Loading…
Reference in a new issue