mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-28 04:34:54 -04:00
remove sigrdataset from dns_view_findzonecut()
Since the `sigrdataset` "output" parameter of `dns_view_findzonecut()` is never used (always called with NULL), it is now removed. Also, since the resolver is moving towards a parent-centric direction, there is no point having a signature for the NS record (which is not authoritative in the parent, so never signed) in the contextes where `dns_view_findzonecut()` is called.
This commit is contained in:
parent
9379ee2c1f
commit
18d6b94c1f
6 changed files with 19 additions and 33 deletions
|
|
@ -6591,7 +6591,7 @@ tat_send(void *arg) {
|
|||
domain = dns_fixedname_initname(&fdomain);
|
||||
dns_rdataset_init(&nameservers);
|
||||
result = dns_view_findzonecut(tat->view, keyname, domain, NULL, 0, 0,
|
||||
true, true, &nameservers, NULL);
|
||||
true, true, &nameservers);
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
result = dns_resolver_createfetch(
|
||||
tat->view->resolver, tatname, dns_rdatatype_null,
|
||||
|
|
|
|||
|
|
@ -2739,7 +2739,7 @@ fetch_name(dns_adbname_t *adbname, bool start_at_zone, bool no_validation,
|
|||
adbname);
|
||||
name = dns_fixedname_initname(&fixed);
|
||||
CHECK(dns_view_findzonecut(adb->view, adbname->name, name, NULL,
|
||||
0, 0, true, false, &rdataset, NULL));
|
||||
0, 0, true, false, &rdataset));
|
||||
nameservers = &rdataset;
|
||||
options |= DNS_FETCHOPT_UNSHARED;
|
||||
} else if (adb->view->qminimization) {
|
||||
|
|
|
|||
|
|
@ -687,7 +687,7 @@ isc_result_t
|
|||
dns_view_findzonecut(dns_view_t *view, const dns_name_t *name,
|
||||
dns_name_t *fname, dns_name_t *dcname, isc_stdtime_t now,
|
||||
unsigned int options, bool use_hints, bool use_cache,
|
||||
dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset);
|
||||
dns_rdataset_t *rdataset);
|
||||
/*%<
|
||||
* Find the best known zonecut containing 'name'.
|
||||
*
|
||||
|
|
@ -704,9 +704,6 @@ dns_view_findzonecut(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 'sigrdataset' is not NULL, and there is a SIG rdataset which
|
||||
* covers 'type', then 'sigrdataset' will be bound to it.
|
||||
*
|
||||
*\li If the DNS_DBFIND_NOEXACT option is set, then the zonecut returned
|
||||
* (if any) will be the deepest known ancestor of 'name'.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -4498,7 +4498,7 @@ resume_qmin(void *arg) {
|
|||
}
|
||||
result = dns_view_findzonecut(res->view, fctx->name, fname, dcname,
|
||||
fctx->now, findoptions, true, true,
|
||||
&fctx->nameservers, NULL);
|
||||
&fctx->nameservers);
|
||||
FCTXTRACEN("resume_qmin findzonecut", fname, result);
|
||||
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
|
|
@ -4946,7 +4946,7 @@ fctx__create(dns_resolver_t *res, isc_loop_t *loop, const dns_name_t *name,
|
|||
result = dns_view_findzonecut(
|
||||
res->view, name, fctx->fwdname, dcname,
|
||||
fctx->now, findoptions, true, true,
|
||||
&fctx->nameservers, NULL);
|
||||
&fctx->nameservers);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
goto cleanup_nameservers;
|
||||
}
|
||||
|
|
@ -9219,9 +9219,9 @@ rctx_nextserver(respctx_t *rctx, dns_message_t *message,
|
|||
} else {
|
||||
name = fctx->domain;
|
||||
}
|
||||
result = dns_view_findzonecut(
|
||||
fctx->res->view, name, fname, dcname, fctx->now,
|
||||
findoptions, true, true, &fctx->nameservers, NULL);
|
||||
result = dns_view_findzonecut(fctx->res->view, name, fname,
|
||||
dcname, fctx->now, findoptions,
|
||||
true, true, &fctx->nameservers);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
FCTXTRACE("couldn't find a zonecut");
|
||||
fctx_failure_detach(&rctx->fctx, DNS_R_SERVFAIL);
|
||||
|
|
|
|||
|
|
@ -3235,8 +3235,7 @@ seek_ds(dns_validator_t *val, isc_result_t *resp) {
|
|||
if (result == DNS_R_NXRRSET &&
|
||||
!dns_rdataset_isassociated(&val->frdataset) &&
|
||||
dns_view_findzonecut(val->view, tname, found, NULL, 0, 0,
|
||||
false, false, NULL,
|
||||
NULL) == ISC_R_SUCCESS &&
|
||||
false, false, NULL) == ISC_R_SUCCESS &&
|
||||
dns_name_equal(tname, found))
|
||||
{
|
||||
*resp = markanswer(val, "seek_ds (2)");
|
||||
|
|
|
|||
|
|
@ -986,7 +986,7 @@ dns_view_simplefind(dns_view_t *view, const dns_name_t *name,
|
|||
static isc_result_t
|
||||
findzonecut_zone(dns_view_t *view, const dns_name_t *name, dns_name_t *fname,
|
||||
dns_name_t *dcname, isc_stdtime_t now, unsigned int options,
|
||||
dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset) {
|
||||
dns_rdataset_t *rdataset) {
|
||||
dns_db_t *db = NULL;
|
||||
dns_zone_t *zone = NULL;
|
||||
unsigned int ztoptions = DNS_ZTFIND_MIRROR;
|
||||
|
|
@ -1016,7 +1016,7 @@ findzonecut_zone(dns_view_t *view, const dns_name_t *name, dns_name_t *fname,
|
|||
}
|
||||
|
||||
result = dns_db_find(db, name, NULL, dns_rdatatype_ns, options, now,
|
||||
NULL, fname, rdataset, sigrdataset);
|
||||
NULL, fname, rdataset, NULL);
|
||||
if (result != DNS_R_DELEGATION && result != ISC_R_SUCCESS) {
|
||||
/*
|
||||
* The zone exists, but there is no delegation. Here again
|
||||
|
|
@ -1043,7 +1043,6 @@ findzonecut_zone(dns_view_t *view, const dns_name_t *name, dns_name_t *fname,
|
|||
cleanup:
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
dns_rdataset_cleanup(rdataset);
|
||||
dns_rdataset_cleanup(sigrdataset);
|
||||
}
|
||||
|
||||
if (db != NULL) {
|
||||
|
|
@ -1060,13 +1059,13 @@ cleanup:
|
|||
static isc_result_t
|
||||
findzonecut_cache(dns_view_t *view, const dns_name_t *name, dns_name_t *fname,
|
||||
dns_name_t *dcname, isc_stdtime_t now, unsigned int options,
|
||||
dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset) {
|
||||
dns_rdataset_t *rdataset) {
|
||||
isc_result_t result = DNS_R_NXDOMAIN;
|
||||
|
||||
if (view->cachedb != NULL) {
|
||||
result = dns_db_findzonecut(view->cachedb, name, options, now,
|
||||
NULL, fname, dcname, rdataset,
|
||||
sigrdataset);
|
||||
NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -1076,7 +1075,6 @@ findzonecut_cache(dns_view_t *view, const dns_name_t *name, dns_name_t *fname,
|
|||
*/
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
dns_rdataset_cleanup(rdataset);
|
||||
dns_rdataset_cleanup(sigrdataset);
|
||||
result = DNS_R_NXDOMAIN;
|
||||
}
|
||||
|
||||
|
|
@ -1087,16 +1085,15 @@ static void
|
|||
findzonecut_zoneorcache(dns_view_t *view, const dns_name_t *name,
|
||||
dns_name_t *fname, dns_name_t *dcname,
|
||||
isc_stdtime_t now, unsigned int options,
|
||||
dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset) {
|
||||
dns_rdataset_t *rdataset) {
|
||||
isc_result_t result;
|
||||
dns_rdataset_t crdataset = DNS_RDATASET_INIT;
|
||||
dns_rdataset_t csigrdataset = DNS_RDATASET_INIT;
|
||||
dns_fixedname_t f, dc;
|
||||
dns_name_t *cfname = dns_fixedname_initname(&f);
|
||||
dns_name_t *cdcname = dns_fixedname_initname(&dc);
|
||||
|
||||
CHECK(findzonecut_cache(view, name, cfname, cdcname, now, options,
|
||||
&crdataset, &csigrdataset));
|
||||
&crdataset));
|
||||
|
||||
bool cacheclosest = dns_name_issubdomain(cfname, fname);
|
||||
bool staticstub = rdataset->attributes.staticstub &&
|
||||
|
|
@ -1104,12 +1101,7 @@ findzonecut_zoneorcache(dns_view_t *view, const dns_name_t *name,
|
|||
|
||||
if (cacheclosest && !staticstub) {
|
||||
dns_rdataset_cleanup(rdataset);
|
||||
dns_rdataset_cleanup(sigrdataset);
|
||||
|
||||
dns_rdataset_clone(&crdataset, rdataset);
|
||||
if (sigrdataset != NULL) {
|
||||
dns_rdataset_clone(&csigrdataset, sigrdataset);
|
||||
}
|
||||
|
||||
dns_name_copy(cfname, fname);
|
||||
if (dcname != NULL) {
|
||||
|
|
@ -1119,7 +1111,6 @@ findzonecut_zoneorcache(dns_view_t *view, const dns_name_t *name,
|
|||
|
||||
cleanup:
|
||||
dns_rdataset_cleanup(&crdataset);
|
||||
dns_rdataset_cleanup(&csigrdataset);
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
|
|
@ -1146,14 +1137,14 @@ isc_result_t
|
|||
dns_view_findzonecut(dns_view_t *view, const dns_name_t *name,
|
||||
dns_name_t *fname, dns_name_t *dcname, isc_stdtime_t now,
|
||||
unsigned int options, bool usehints, bool usecache,
|
||||
dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset) {
|
||||
dns_rdataset_t *rdataset) {
|
||||
isc_result_t result;
|
||||
|
||||
REQUIRE(DNS_VIEW_VALID(view));
|
||||
REQUIRE(view->frozen);
|
||||
|
||||
result = findzonecut_zone(view, name, fname, dcname, now, options,
|
||||
rdataset, sigrdataset);
|
||||
rdataset);
|
||||
|
||||
if (result == DNS_R_NXDOMAIN && usecache) {
|
||||
/*
|
||||
|
|
@ -1161,14 +1152,14 @@ dns_view_findzonecut(dns_view_t *view, const dns_name_t *name,
|
|||
* delegation.
|
||||
*/
|
||||
result = findzonecut_cache(view, name, fname, dcname, now,
|
||||
options, rdataset, sigrdataset);
|
||||
options, rdataset);
|
||||
} else if (result == ISC_R_SUCCESS && usecache) {
|
||||
/*
|
||||
* A zone with a (possibly partial) delegation match but the
|
||||
* cache can have a more precise delegation.
|
||||
*/
|
||||
findzonecut_zoneorcache(view, name, fname, dcname, now, options,
|
||||
rdataset, sigrdataset);
|
||||
rdataset);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -1181,7 +1172,6 @@ dns_view_findzonecut(dns_view_t *view, const dns_name_t *name,
|
|||
if (result != ISC_R_SUCCESS) {
|
||||
result = DNS_R_NXDOMAIN;
|
||||
dns_rdataset_cleanup(rdataset);
|
||||
dns_rdataset_cleanup(sigrdataset);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
|
|
|||
Loading…
Reference in a new issue