]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
The proper "expired" test is ttd <= now
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Tue, 5 Sep 2023 08:40:27 +0000 (10:40 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Fri, 22 Sep 2023 07:19:44 +0000 (09:19 +0200)
(cherry picked from commit 17806638ce9ae1643d881faa7328a85f98eeb265)

pdns/recursordist/aggressive_nsec.cc

index 22fe68aad8b3fcbd3f3d8af372213a08a56807f7..c22d81ea61198e777df797e32d4621f2b732a927 100644 (file)
@@ -140,7 +140,7 @@ void AggressiveNSECCache::prune(time_t now)
     const auto toLookAtForThisZone = (zoneEntry->d_entries.size() + 9) / 10;
     uint64_t lookedAt = 0;
     for (auto it = sidx.begin(); it != sidx.end() && lookedAt < toLookAtForThisZone; ++lookedAt) {
-      if (it->d_ttd < now) {
+      if (it->d_ttd <= now) {
         it = sidx.erase(it);
         ++erased;
       }