]> git.ipfire.org Git - thirdparty/knot-dns.git/commitdiff
zonedb: preserve all zone flags (including zone XFR freeze) during reload
authorDaniel Salzman <daniel.salzman@nic.cz>
Wed, 6 Apr 2022 15:30:26 +0000 (17:30 +0200)
committerDaniel Salzman <daniel.salzman@nic.cz>
Wed, 6 Apr 2022 15:30:43 +0000 (17:30 +0200)
src/knot/zone/zone.h
src/knot/zone/zonedb-load.c

index 1abcac7a430754c1214410204866737cc39afa1b..4eafe5fd3fe6c8686bcb266f80601c6eb9169d69 100644 (file)
@@ -34,6 +34,8 @@ struct zone_backup_ctx;
 
 /*!
  * \brief Zone flags.
+ *
+ * When updating check create_zone_reload() if the flag mask is ok.
  */
 typedef enum {
        ZONE_FORCE_AXFR     = 1 << 0, /*!< Force AXFR as next transfer. */
index 66e87f48ea40f9c76dd3758b7ae2a69b084b32fd..e3a8411246203efd5510db265897ee86cb015ba0 100644 (file)
@@ -91,7 +91,7 @@ static zone_t *create_zone_reload(conf_t *conf, const knot_dname_t *name,
        }
 
        zone->contents = old_zone->contents;
-       zone_set_flag(zone, zone_get_flag(old_zone, ZONE_IS_CATALOG | ZONE_IS_CAT_MEMBER, false));
+       zone_set_flag(zone, zone_get_flag(old_zone, ~0, false));
 
        zone->timers = old_zone->timers;
        zone_timers_sanitize(conf, zone);