mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-02 15:45:25 +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:
@@ -1473,8 +1473,8 @@ find_deepest_zonecut(qpc_search_t *search, qpcnode_t *node,
|
|||||||
*/
|
*/
|
||||||
static isc_result_t
|
static isc_result_t
|
||||||
find_coveringnsec(qpc_search_t *search, const dns_name_t *name,
|
find_coveringnsec(qpc_search_t *search, const dns_name_t *name,
|
||||||
dns_dbnode_t **nodep, isc_stdtime_t now,
|
dns_dbnode_t **nodep, dns_name_t *foundname,
|
||||||
dns_name_t *foundname, dns_rdataset_t *rdataset,
|
dns_rdataset_t *rdataset,
|
||||||
dns_rdataset_t *sigrdataset DNS__DB_FLARG) {
|
dns_rdataset_t *sigrdataset DNS__DB_FLARG) {
|
||||||
dns_fixedname_t fpredecessor, fixed;
|
dns_fixedname_t fpredecessor, fixed;
|
||||||
dns_name_t *predecessor = NULL, *fname = NULL;
|
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;
|
header_prev = header;
|
||||||
}
|
}
|
||||||
if (found != NULL) {
|
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);
|
isc_rwlocktype_none, rdataset DNS__DB_FLARG_PASS);
|
||||||
if (foundsig != NULL) {
|
if (foundsig != NULL) {
|
||||||
bindrdataset(search->qpdb, node, foundsig, now,
|
bindrdataset(search->qpdb, node, foundsig, search->now,
|
||||||
nlocktype, isc_rwlocktype_none,
|
nlocktype, isc_rwlocktype_none,
|
||||||
sigrdataset DNS__DB_FLARG_PASS);
|
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))
|
search.zonecut_header->type != dns_rdatatype_dname))
|
||||||
{
|
{
|
||||||
result = find_coveringnsec(
|
result = find_coveringnsec(
|
||||||
&search, name, nodep, now, foundname, rdataset,
|
&search, name, nodep, foundname, rdataset,
|
||||||
sigrdataset DNS__DB_FLARG_PASS);
|
sigrdataset DNS__DB_FLARG_PASS);
|
||||||
if (result == DNS_R_COVERINGNSEC) {
|
if (result == DNS_R_COVERINGNSEC) {
|
||||||
goto tree_exit;
|
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);
|
NODE_UNLOCK(nlock, &nlocktype);
|
||||||
if ((search.options & DNS_DBFIND_COVERINGNSEC) != 0) {
|
if ((search.options & DNS_DBFIND_COVERINGNSEC) != 0) {
|
||||||
result = find_coveringnsec(
|
result = find_coveringnsec(
|
||||||
&search, name, nodep, now, foundname, rdataset,
|
&search, name, nodep, foundname, rdataset,
|
||||||
sigrdataset DNS__DB_FLARG_PASS);
|
sigrdataset DNS__DB_FLARG_PASS);
|
||||||
if (result == DNS_R_COVERINGNSEC) {
|
if (result == DNS_R_COVERINGNSEC) {
|
||||||
goto tree_exit;
|
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);
|
NODE_UNLOCK(nlock, &nlocktype);
|
||||||
result = find_coveringnsec(
|
result = find_coveringnsec(
|
||||||
&search, name, nodep, now, foundname, rdataset,
|
&search, name, nodep, foundname, rdataset,
|
||||||
sigrdataset DNS__DB_FLARG_PASS);
|
sigrdataset DNS__DB_FLARG_PASS);
|
||||||
if (result == DNS_R_COVERINGNSEC) {
|
if (result == DNS_R_COVERINGNSEC) {
|
||||||
goto tree_exit;
|
goto tree_exit;
|
||||||
|
Reference in New Issue
Block a user