From: Ondřej Surý Date: Sun, 31 Aug 2025 17:34:35 +0000 (+0200) Subject: Remove qname/qtype from dns_adb_createfind() call X-Git-Tag: v9.21.12~7^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5b025d6e4345809c3dbca9a07039cbda82e9f852;p=thirdparty%2Fbind9.git Remove qname/qtype from dns_adb_createfind() call Both qname and qtype arguments to dns_adb_createfind() were unused. Remove both these arguments from the function prototype. --- diff --git a/lib/dns/adb.c b/lib/dns/adb.c index 0680d774668..2c2c7ba6777 100644 --- a/lib/dns/adb.c +++ b/lib/dns/adb.c @@ -1715,8 +1715,7 @@ dns_adb_shutdown(dns_adb_t *adb) { */ isc_result_t dns_adb_createfind(dns_adb_t *adb, isc_loop_t *loop, isc_job_cb cb, void *cbarg, - const dns_name_t *name, const dns_name_t *qname, - dns_rdatatype_t qtype ISC_ATTR_UNUSED, unsigned int options, + const dns_name_t *name, unsigned int options, isc_stdtime_t now, in_port_t port, unsigned int depth, isc_counter_t *qc, isc_counter_t *gqc, dns_adbfind_t **findp) { @@ -1737,7 +1736,6 @@ dns_adb_createfind(dns_adb_t *adb, isc_loop_t *loop, isc_job_cb cb, void *cbarg, REQUIRE(cb != NULL); } REQUIRE(name != NULL); - REQUIRE(qname != NULL); REQUIRE(findp != NULL && *findp == NULL); REQUIRE((options & DNS_ADBFIND_ADDRESSMASK) != 0); @@ -2949,8 +2947,6 @@ maybe_adjust_quota(dns_adb_t *adb, dns_adbaddrinfo_t *addr, bool timeout) { } } -#define EDNSTOS 3U - void dns_adb_plainresponse(dns_adb_t *adb, dns_adbaddrinfo_t *addr) { REQUIRE(DNS_ADB_VALID(adb)); diff --git a/lib/dns/include/dns/adb.h b/lib/dns/include/dns/adb.h index 37df390ba6d..4c0207f8428 100644 --- a/lib/dns/include/dns/adb.h +++ b/lib/dns/include/dns/adb.h @@ -276,8 +276,7 @@ dns_adb_shutdown(dns_adb_t *adb); isc_result_t dns_adb_createfind(dns_adb_t *adb, isc_loop_t *loop, isc_job_cb cb, void *cbarg, - const dns_name_t *name, const dns_name_t *qname, - dns_rdatatype_t qtype, unsigned int options, + const dns_name_t *name, unsigned int options, isc_stdtime_t now, in_port_t port, unsigned int depth, isc_counter_t *qc, isc_counter_t *gqc, dns_adbfind_t **find); /*%< @@ -325,8 +324,6 @@ dns_adb_createfind(dns_adb_t *adb, isc_loop_t *loop, isc_job_cb cb, void *cbarg, * *\li *name is a valid dns_name_t. * - *\li qname != NULL and *qname be a valid dns_name_t. - * *\li find != NULL && *find == NULL. * * Returns: @@ -372,16 +369,6 @@ dns_adb_cancelfind(dns_adbfind_t *find); *\li The event was posted to the task. */ -void -dns_adbfind_done(dns_adbfind_t find); -/*%< - * Marks a find as ready to free. - * - * Requires: - * - *\li 'find' != NULL and *find be valid dns_adbfind_t pointer. - */ - unsigned int dns_adb_findstatus(dns_adbfind_t *); /*%< diff --git a/lib/dns/resolver.c b/lib/dns/resolver.c index 69424f4a892..26204bde100 100644 --- a/lib/dns/resolver.c +++ b/lib/dns/resolver.c @@ -3222,9 +3222,9 @@ findname(fetchctx_t *fctx, const dns_name_t *name, in_port_t port, INSIST(!SHUTTINGDOWN(fctx)); fetchctx_ref(fctx); result = dns_adb_createfind(fctx->adb, fctx->loop, fctx_finddone, fctx, - name, fctx->name, fctx->type, options, now, - res->view->dstport, fctx->depth + 1, - fctx->qc, fctx->gqc, &find); + name, options, now, res->view->dstport, + fctx->depth + 1, fctx->qc, fctx->gqc, + &find); isc_log_write(DNS_LOGCATEGORY_RESOLVER, DNS_LOGMODULE_RESOLVER, ISC_LOG_DEBUG(3), "fctx %p(%s): createfind for %s - %s", diff --git a/lib/dns/zone.c b/lib/dns/zone.c index 8ffaeb7982e..a25aeb89675 100644 --- a/lib/dns/zone.c +++ b/lib/dns/zone.c @@ -12772,8 +12772,8 @@ notify_find_address(dns_notify_t *notify) { result = dns_adb_createfind( adb, notify->zone->loop, process_notify_adb_event, notify, - ¬ify->ns, dns_rootname, 0, options, 0, - notify->zone->view->dstport, 0, NULL, NULL, ¬ify->find); + ¬ify->ns, options, 0, notify->zone->view->dstport, 0, NULL, + NULL, ¬ify->find); dns_adb_detach(&adb); /* Something failed? */ @@ -21351,8 +21351,8 @@ checkds_find_address(dns_checkds_t *checkds) { result = dns_adb_createfind( adb, checkds->zone->loop, process_checkds_adb_event, checkds, - &checkds->ns, dns_rootname, 0, options, 0, - checkds->zone->view->dstport, 0, NULL, NULL, &checkds->find); + &checkds->ns, options, 0, checkds->zone->view->dstport, 0, NULL, + NULL, &checkds->find); dns_adb_detach(&adb); /* Something failed? */