Commit 45cb487f authored by Libor Peltan's avatar Libor Peltan Committed by Daniel Salzman
Browse files

ds query: dont replan if no ready key

parent 111d97d6
Pipeline #88048 failed with stages
in 183 minutes and 19 seconds
......@@ -36,14 +36,18 @@ int event_ds_check(conf_t *conf, zone_t *zone)
ret = knot_parent_ds_query(&ctx, &keyset, conf->cache.srv_tcp_remote_io_timeout);
zone->timers.next_ds_check = 0;
if (ret != KNOT_EOK) {
switch (ret) {
case KNOT_NO_READY_KEY:
break;
case KNOT_EOK:
zone_events_schedule_now(zone, ZONE_EVENT_DNSSEC);
break;
default:
if (ctx.policy->ksk_sbm_check_interval > 0) {
time_t next_check = time(NULL) + ctx.policy->ksk_sbm_check_interval;
zone->timers.next_ds_check = next_check;
zone_events_schedule_at(zone, ZONE_EVENT_DS_CHECK, next_check);
}
} else {
zone_events_schedule_now(zone, ZONE_EVENT_DNSSEC);
}
free_zone_keys(&keyset);
......
......@@ -490,7 +490,7 @@ static knotd_in_state_t pre_routine(knotd_in_state_t state, knot_pkt_t *pkt,
pthread_rwlock_rdlock(&ctx->signing_mutex);
ret = knot_parent_ds_query(mod->dnssec, mod->keyset, 1000);
pthread_rwlock_unlock(&ctx->signing_mutex);
if (ret != KNOT_EOK && mod->dnssec->policy->ksk_sbm_check_interval > 0) {
if (ret != KNOT_EOK && ret != KNOT_NO_READY_KEY && mod->dnssec->policy->ksk_sbm_check_interval > 0) {
ctx->event_parent_ds_q = mod->dnssec->now + mod->dnssec->policy->ksk_sbm_check_interval;
} else {
ctx->event_parent_ds_q = 0;
......
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