Commit d80a4b7b authored by Libor Peltan's avatar Libor Peltan Committed by Daniel Salzman

ksk rollover: simplified: submittion interval in policy

parent ccb1b860
......@@ -81,6 +81,9 @@ static void policy_load(knot_kasp_policy_t *policy, conf_val_t *id)
val = conf_id_get(conf(), C_POLICY, C_NSEC3_SALT_LIFETIME, id);
policy->nsec3_salt_lifetime = conf_int(&val);
val = conf_id_get(conf(), C_POLICY, C_KSK_SUBMITTION_CHECK_INTERVAL, id);
policy->ksk_submittion_check_interval = conf_int(&val);
}
int kdnssec_ctx_init(conf_t *conf, kdnssec_ctx_t *ctx, const knot_dname_t *zone_name,
......
......@@ -83,4 +83,6 @@ typedef struct {
uint32_t zone_maximal_ttl;
// data propagation delay
uint32_t propagation_delay;
// various
uint32_t ksk_submittion_check_interval;
} knot_kasp_policy_t;
......@@ -206,13 +206,8 @@ int event_parent_ds_q(conf_t *conf, zone_t *zone)
}
}
conf_val_t policy = conf_zone_get(conf, C_DNSSEC_POLICY, zone->name);
if (ret != KNOT_EOK) {
uint8_t *policy_name = (uint8_t *)conf_str(&policy);
size_t policy_name_len = strlen((const char *)policy_name) + 1;
conf_val_t check_interval = conf_rawid_get(conf, C_POLICY, C_KSK_SUBMITTION_CHECK_INTERVAL,
policy_name, policy_name_len);
time_t next_check = time(NULL) + conf_int(&check_interval);
time_t next_check = time(NULL) + ctx.policy->ksk_submittion_check_interval;
zone_events_schedule_at(zone, ZONE_EVENT_PARENT_DS_Q, next_check);
} else {
zone_events_schedule_now(zone, ZONE_EVENT_KEY_ROLLOVER);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment