]> git.ipfire.org Git - thirdparty/knot-dns.git/commitdiff
zone/timers: remove compatibility for obsoleted in 3.2.0
authorLibor Peltan <libor.peltan@nic.cz>
Tue, 4 Nov 2025 07:45:35 +0000 (08:45 +0100)
committerLibor Peltan <libor.peltan@nic.cz>
Mon, 24 Nov 2025 09:37:42 +0000 (10:37 +0100)
src/knot/zone/timers.c
src/knot/zone/timers.h
src/knot/zone/zone.c

index e1942fd061ef897d87517df1705f92c2e33ea2bf..408db5e6a5cece540b16ff2213c06e2b7e026b2c 100644 (file)
@@ -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;
 }
 
index 293781039b985c33cddb9dc11bb1699a3c1bf182..3885431d917f0094ef0fc8b5c114bb50d7ed7e31 100644 (file)
@@ -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;
index 10f905978f22977c8a9cdb04e71d1db7fc8b7df6..9e200cf77922fabc5ee974043d258be8debd72b9 100644 (file)
@@ -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;