]> git.ipfire.org Git - thirdparty/knot-dns.git/commitdiff
replan: replan the expire if the zone expired during the load
authorLibor Peltan <libor.peltan@nic.cz>
Sun, 14 Aug 2022 07:58:47 +0000 (09:58 +0200)
committerDavid Vašek <david.vasek@nic.cz>
Mon, 15 Aug 2022 19:17:10 +0000 (21:17 +0200)
src/knot/events/replan.c

index e69e67fd7c2da0b26c346a1b2b7cdd3a26128550..b7d70e4eea18db2d158338f0cc0d7ef96aec7ba3 100644 (file)
@@ -113,13 +113,13 @@ void replan_from_timers(conf_t *conf, zone_t *zone)
 
        time_t expire_pre = TIME_IGNORE;
        time_t expire = TIME_IGNORE;
-       if (zone_is_slave(conf, zone) && !zone_expired(zone)) {
+       if (zone_is_slave(conf, zone) && zone->contents != NULL) {
                expire_pre = TIME_CANCEL;
                expire = zone->timers.next_expire;
        }
 
        time_t flush = TIME_IGNORE;
-       if (!zone_is_slave(conf, zone) || !zone_expired(zone)) {
+       if (!zone_is_slave(conf, zone) || zone->contents != NULL) {
                conf_val_t val = conf_zone_get(conf, C_ZONEFILE_SYNC, zone->name);
                int64_t sync_timeout = conf_int(&val);
                if (sync_timeout > 0) {