From 0df86d0039618ea367f322c7d9cae6ca293934b6 Mon Sep 17 00:00:00 2001 From: Libor Peltan Date: Tue, 4 Nov 2025 08:45:35 +0100 Subject: [PATCH] zone/timers: remove compatibility for obsoleted in 3.2.0 --- src/knot/zone/timers.c | 10 ---------- src/knot/zone/timers.h | 2 -- src/knot/zone/zone.c | 1 - 3 files changed, 13 deletions(-) diff --git a/src/knot/zone/timers.c b/src/knot/zone/timers.c index e1942fd061..408db5e6a5 100644 --- a/src/knot/zone/timers.c +++ b/src/knot/zone/timers.c @@ -38,9 +38,7 @@ */ enum timer_id { TIMER_INVALID = 0, - TIMER_SOA_EXPIRE = 0x80, // DEPRECATED TIMER_LAST_FLUSH = 0x81, - TIMER_LAST_REFRESH = 0x82, // DEPRECATED TIMER_NEXT_REFRESH = 0x83, TIMER_NEXT_DS_CHECK = 0x85, TIMER_NEXT_DS_PUSH = 0x86, @@ -78,9 +76,7 @@ static int deserialize_timers(zone_timers_t *timers_ptr, } uint64_t value = wire_ctx_read_u64(&wire); switch (id) { - case TIMER_SOA_EXPIRE: timers.soa_expire = value; break; case TIMER_LAST_FLUSH: timers.last_flush = value; break; - case TIMER_LAST_REFRESH: timers.last_refresh = value; break; case TIMER_NEXT_REFRESH: timers.next_refresh = value; break; case TIMER_LAST_REFR_OK: timers.last_refresh_ok = value; break; case TIMER_LAST_NOTIFIED: timers.last_notified_serial = value; break; @@ -174,12 +170,6 @@ int zone_timers_read(knot_lmdb_db_t *db, const knot_dname_t *zone, } knot_lmdb_abort(&txn); - // backward compatibility - // For catalog zones, next_expire is cleaned up later by zone_timers_sanitize(). - if (timers->next_expire == 0 && timers->last_refresh > 0) { - timers->next_expire = timers->last_refresh + timers->soa_expire; - } - return txn.ret; } diff --git a/src/knot/zone/timers.h b/src/knot/zone/timers.h index 293781039b..3885431d91 100644 --- a/src/knot/zone/timers.h +++ b/src/knot/zone/timers.h @@ -20,9 +20,7 @@ * \brief Persistent zone timers. */ struct zone_timers { - uint32_t soa_expire; //!< SOA expire value. DEPRECATED time_t last_flush; //!< Last zone file synchronization. - time_t last_refresh; //!< Last successful zone refresh attempt. DEPRECATED time_t next_refresh; //!< Next zone refresh attempt. uint32_t last_signed_serial; //!< SOA serial of last signed zone version. uint8_t last_signed_s_flags; //!< If last signed serial detected and valid; diff --git a/src/knot/zone/zone.c b/src/knot/zone/zone.c index 10f905978f..9e200cf779 100644 --- a/src/knot/zone/zone.c +++ b/src/knot/zone/zone.c @@ -694,7 +694,6 @@ void zone_timers_sanitize(conf_t *conf, zone_t *zone) } } else { // invalidate if we don't have a master - zone->timers->last_refresh = 0; zone->timers->next_refresh = 0; zone->timers->last_refresh_ok = false; zone->timers->next_expire = 0; -- 2.47.3