Skip to content
Snippets Groups Projects
Commit e1c90e10 authored by Libor Peltan's avatar Libor Peltan
Browse files

zonemd: fix reporting error when verify fails on load

parent b9daef31
No related branches found
No related tags found
1 merge request!1346zonemd: fix reporting error when verify fails on load
Pipeline #86698 passed
......@@ -248,6 +248,12 @@ int event_load(conf_t *conf, zone_t *zone)
goto cleanup;
}
bool zf_serial_updated = (zf_conts != NULL && zone_contents_serial(zf_conts) != zone_contents_serial(zone->contents));
// The contents are already part of zone_update.
zf_conts = NULL;
journal_conts = NULL;
ret = zone_update_verify_digest(conf, &up);
if (ret != KNOT_EOK) {
goto cleanup;
......@@ -255,8 +261,7 @@ int event_load(conf_t *conf, zone_t *zone)
uint32_t middle_serial = zone_contents_serial(up.new_cont);
if (do_diff && old_contents_exist && dnssec_enable && zf_conts != NULL &&
zone_contents_serial(zf_conts) != zone_contents_serial(zone->contents) &&
if (do_diff && old_contents_exist && dnssec_enable && zf_serial_updated &&
!zone_in_journal_exists) {
ret = zone_update_start_extra(&up, conf);
if (ret != KNOT_EOK) {
......@@ -264,10 +269,6 @@ int event_load(conf_t *conf, zone_t *zone)
}
}
// The contents are already part of zone_update.
zf_conts = NULL;
journal_conts = NULL;
// Sign zone using DNSSEC if configured.
zone_sign_reschedule_t dnssec_refresh = { 0 };
if (dnssec_enable) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment