diff --git a/lib/dns/deleg.c b/lib/dns/deleg.c index 92ee3f1a8f..708f53ad04 100644 --- a/lib/dns/deleg.c +++ b/lib/dns/deleg.c @@ -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); } diff --git a/lib/dns/include/dns/db.h b/lib/dns/include/dns/db.h index bd8fca23d1..83ea893d29 100644 --- a/lib/dns/include/dns/db.h +++ b/lib/dns/include/dns/db.h @@ -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, diff --git a/lib/dns/include/dns/view.h b/lib/dns/include/dns/view.h index 740ed2496c..e8c0af78b1 100644 --- a/lib/dns/include/dns/view.h +++ b/lib/dns/include/dns/view.h @@ -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. diff --git a/lib/dns/resolver.c b/lib/dns/resolver.c index 65da6ae155..454df5a5a3 100644 --- a/lib/dns/resolver.c +++ b/lib/dns/resolver.c @@ -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) { diff --git a/lib/dns/view.c b/lib/dns/view.c index 1637131a6c..a73c55756c 100644 --- a/lib/dns/view.c +++ b/lib/dns/view.c @@ -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; } diff --git a/tests/dns/deleg_test.c b/tests/dns/deleg_test.c index 8082b67091..d3af6aba96 100644 --- a/tests/dns/deleg_test.c +++ b/tests/dns/deleg_test.c @@ -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);