]> git.ipfire.org Git - thirdparty/knot-dns.git/commitdiff
zone-update: remove useless flag
authorLibor Peltan <libor.peltan@nic.cz>
Wed, 20 Oct 2021 08:32:20 +0000 (10:32 +0200)
committerDaniel Salzman <daniel.salzman@nic.cz>
Thu, 21 Oct 2021 12:32:37 +0000 (14:32 +0200)
src/knot/ctl/commands.c
src/knot/events/handlers/update.c
src/knot/updates/zone-update.h

index 43be6d6e4786b90e882e24f0c10fe3dcc30cb915..cb27333f09d191677493a99f952efe888da1b5ea 100644 (file)
@@ -661,7 +661,7 @@ static int zone_txn_begin(zone_t *zone, _unused_ ctl_args_t *args)
        }
 
        zone_update_flags_t type = (zone->contents == NULL) ? UPDATE_FULL : UPDATE_INCREMENTAL;
-       int ret = zone_update_init(zone->control_update, zone, type | UPDATE_SIGN | UPDATE_STRICT);
+       int ret = zone_update_init(zone->control_update, zone, type | UPDATE_STRICT);
        if (ret != KNOT_EOK) {
                free(zone->control_update);
                zone->control_update = NULL;
@@ -693,7 +693,7 @@ static int zone_txn_commit(zone_t *zone, _unused_ ctl_args_t *args)
 
        // Sign update.
        conf_val_t val = conf_zone_get(conf(), C_DNSSEC_SIGNING, zone->name);
-       bool dnssec_enable = (zone->control_update->flags & UPDATE_SIGN) && conf_bool(&val);
+       bool dnssec_enable = conf_bool(&val);
        if (dnssec_enable) {
                zone_sign_reschedule_t resch = { 0 };
                bool full = (zone->control_update->flags & UPDATE_FULL);
index 6d10f32016ae2f38b4e0d279d6f91ab156708fa8..43e130060f7ca2f2e782307b938c4d362298c698 100644 (file)
@@ -137,7 +137,7 @@ static int process_normal(conf_t *conf, zone_t *zone, list_t *requests)
 
        // Init zone update structure
        zone_update_t up;
-       int ret = zone_update_init(&up, zone, UPDATE_INCREMENTAL | UPDATE_SIGN);
+       int ret = zone_update_init(&up, zone, UPDATE_INCREMENTAL);
        if (ret != KNOT_EOK) {
                set_rcodes(requests, KNOT_RCODE_SERVFAIL);
                return ret;
@@ -156,7 +156,7 @@ static int process_normal(conf_t *conf, zone_t *zone, list_t *requests)
 
        // Sign update.
        conf_val_t val = conf_zone_get(conf, C_DNSSEC_SIGNING, zone->name);
-       bool dnssec_enable = (up.flags & UPDATE_SIGN) && conf_bool(&val);
+       bool dnssec_enable = conf_bool(&val);
        if (dnssec_enable) {
                zone_sign_reschedule_t resch = { 0 };
                ret = knot_dnssec_sign_update(&up, conf, &resch);
index be5d0efc95a86bf3ee71fc3cebd29796bb85df46..5edce40d66e2e9f64c6278315212b3e0b593554d 100644 (file)
@@ -53,7 +53,6 @@ typedef enum {
        UPDATE_HYBRID         = 1 << 1, /*!< Changeset like for incremental, adjusting like full. */
        UPDATE_INCREMENTAL    = 1 << 2, /*!< Apply changes to the old zone. */
        // Additional flags
-       UPDATE_SIGN           = 1 << 3, /*!< Sign the resulting zone. */
        UPDATE_STRICT         = 1 << 4, /*!< Apply changes strictly, i.e. fail when removing nonexistent RR. */
        UPDATE_EXTRA_CHSET    = 1 << 6, /*!< Extra changeset in use, to store diff btwn zonefile and final contents. */
        UPDATE_CHANGED_NSEC   = 1 << 7, /*!< This incremental update affects NSEC or NSEC3 nodes in zone. */