+3405. [bug] Handle time going backwards in acache. [RT #31253]
+
3404. [bug] dnssec-signzone: When re-signing a zone, remove
RRSIG and NSEC records from nodes that used to be
in-zone but are now below a zone cut. [RT #31556]
#include <isc/random.h>
#include <isc/refcount.h>
#include <isc/rwlock.h>
+#include <isc/serial.h>
#include <isc/task.h>
#include <isc/time.h>
#include <isc/timer.h>
* use and the cleaning interval.
*/
if (cleaner->overmem) {
- unsigned int passed =
- now32 - entry->lastused; /* <= interval */
+ unsigned int passed;
isc_uint32_t val;
+ if (isc_serial_ge(now32, entry->lastused))
+ passed = now32 - entry->lastused; /* <= interval */
+ else
+ passed = 0;
+
if (passed > interval / 2)
return (ISC_TRUE);
isc_random_get(&val);
entry = cleaner->current_entry;
isc_stdtime_convert32(cleaner->last_cleanup_time, &last32);
- INSIST(now32 > last32);
- interval = now32 - last32;
+ if (isc_serial_ge(now32, last32))
+ interval = now32 - last32;
+ else
+ interval = 0;
while (n_entries-- > 0) {
isc_boolean_t is_stale = ISC_FALSE;