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

Remove duplicate 'now' argument from find_coveringnsec()

The find_coveringnsec() was getting the 'now' from two sources -
search->now and separate now argument.  Things like this are ticking
bombs, remove the extra 'now' argument and use single source of 'now'.
This commit is contained in:
Ondřej Surý
2025-02-02 14:07:18 +01:00
parent 58179e6a19
commit 60f6b88c63

View File

@@ -1473,8 +1473,8 @@ find_deepest_zonecut(qpc_search_t *search, qpcnode_t *node,
*/
static isc_result_t
find_coveringnsec(qpc_search_t *search, const dns_name_t *name,
dns_dbnode_t **nodep, isc_stdtime_t now,
dns_name_t *foundname, dns_rdataset_t *rdataset,
dns_dbnode_t **nodep, dns_name_t *foundname,
dns_rdataset_t *rdataset,
dns_rdataset_t *sigrdataset DNS__DB_FLARG) {
dns_fixedname_t fpredecessor, fixed;
dns_name_t *predecessor = NULL, *fname = NULL;
@@ -1549,10 +1549,10 @@ find_coveringnsec(qpc_search_t *search, const dns_name_t *name,
header_prev = header;
}
if (found != NULL) {
bindrdataset(search->qpdb, node, found, now, nlocktype,
bindrdataset(search->qpdb, node, found, search->now, nlocktype,
isc_rwlocktype_none, rdataset DNS__DB_FLARG_PASS);
if (foundsig != NULL) {
bindrdataset(search->qpdb, node, foundsig, now,
bindrdataset(search->qpdb, node, foundsig, search->now,
nlocktype, isc_rwlocktype_none,
sigrdataset DNS__DB_FLARG_PASS);
}
@@ -1662,7 +1662,7 @@ qpcache_find(dns_db_t *db, const dns_name_t *name, dns_dbversion_t *version,
search.zonecut_header->type != dns_rdatatype_dname))
{
result = find_coveringnsec(
&search, name, nodep, now, foundname, rdataset,
&search, name, nodep, foundname, rdataset,
sigrdataset DNS__DB_FLARG_PASS);
if (result == DNS_R_COVERINGNSEC) {
goto tree_exit;
@@ -1824,7 +1824,7 @@ qpcache_find(dns_db_t *db, const dns_name_t *name, dns_dbversion_t *version,
NODE_UNLOCK(nlock, &nlocktype);
if ((search.options & DNS_DBFIND_COVERINGNSEC) != 0) {
result = find_coveringnsec(
&search, name, nodep, now, foundname, rdataset,
&search, name, nodep, foundname, rdataset,
sigrdataset DNS__DB_FLARG_PASS);
if (result == DNS_R_COVERINGNSEC) {
goto tree_exit;
@@ -1881,7 +1881,7 @@ qpcache_find(dns_db_t *db, const dns_name_t *name, dns_dbversion_t *version,
{
NODE_UNLOCK(nlock, &nlocktype);
result = find_coveringnsec(
&search, name, nodep, now, foundname, rdataset,
&search, name, nodep, foundname, rdataset,
sigrdataset DNS__DB_FLARG_PASS);
if (result == DNS_R_COVERINGNSEC) {
goto tree_exit;