Skip to content
Snippets Groups Projects
Commit 25d7f1d1 authored by Libor Peltan's avatar Libor Peltan Committed by Daniel Salzman
Browse files

zone-update: fix handling of contents resources when retrying zone_load_diff

parent ad6c3cb6
No related branches found
No related tags found
1 merge request!1240Zone load fixes
Pipeline #74687 passed
......@@ -206,6 +206,7 @@ int event_load(conf_t *conf, zone_t *zone)
"zone file changed with SOA serial %s, "
"ignoring zone file and loading from journal",
(ret == KNOT_ESEMCHECK ? "unupdated" : "decreased"));
zone_contents_deep_free(zf_conts);
ret = zone_update_from_contents(&up, zone, journal_conts, UPDATE_HYBRID);
}
}
......
......@@ -185,7 +185,16 @@ int zone_update_from_differences(zone_update_t *update, zone_t *zone, zone_conte
}
ret = zone_contents_diff(old_cont, new_cont, &diff, ignore_dnssec);
if (ret != KNOT_EOK && ret != KNOT_ENODIFF && ret != KNOT_ESEMCHECK) {
switch (ret) {
case KNOT_ENODIFF:
case KNOT_ESEMCHECK:
case KNOT_EOK:
break;
case KNOT_ERANGE:
update->new_cont = NULL; // Prevent deep_free as old_cont will be used later.
update->a_ctx->flags &= ~APPLY_UNIFY_FULL; // Prevent Unify of old_cont that will be used later.
// FALLTHROUGH
default:
changeset_clear(&diff);
zone_update_clear(update);
return ret;
......
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