]> git.ipfire.org Git - thirdparty/knot-dns.git/commitdiff
zone: purge 'timers.catalog_member' only if catalog filter is specified
authorDaniel Salzman <daniel.salzman@nic.cz>
Thu, 30 Jun 2022 12:24:31 +0000 (14:24 +0200)
committerDaniel Salzman <daniel.salzman@nic.cz>
Fri, 1 Jul 2022 07:32:30 +0000 (09:32 +0200)
src/knot/zone/zone.c

index e456ac678c1999232b8005b72f9c8fbb7144c6ab..18bd80ed99a3d4eebc9374b7b4abc0cdd76c0a34 100644 (file)
@@ -278,7 +278,9 @@ int selective_zone_purge(conf_t *conf, zone_t *zone, purge_flag_t params)
 
        // Purge the zone timers.
        if (params & PURGE_ZONE_TIMERS) {
-               memset(&zone->timers, 0, sizeof(zone->timers));
+               zone->timers = (zone_timers_t) {
+                       .catalog_member = zone->timers.catalog_member
+               };
                ret = zone_timers_sweep(&zone->server->timerdb,
                                        (sweep_cb)knot_dname_cmp, zone->name);
                RETURN_IF_FAILED("timers", KNOT_ENOENT);
@@ -314,6 +316,7 @@ int selective_zone_purge(conf_t *conf, zone_t *zone, purge_flag_t params)
 
        // Purge Catalog.
        if (params & PURGE_ZONE_CATALOG) {
+               zone->timers.catalog_member = 0;
                ret = catalog_zone_purge(zone->server, conf, zone->name);
                RETURN_IF_FAILED("catalog", KNOT_EOK);
        }