]> git.ipfire.org Git - thirdparty/knot-dns.git/commitdiff
zone-update: bugfix: correctly revert adjustments to otherwise unaffected nodes
authorLibor Peltan <libor.peltan@nic.cz>
Mon, 16 Jun 2025 09:59:23 +0000 (11:59 +0200)
committerDaniel Salzman <daniel.salzman@nic.cz>
Fri, 1 Aug 2025 15:31:18 +0000 (17:31 +0200)
src/knot/updates/apply.c

index 41ac58fb9fb5210e6f988a5c62f12405537d2b31..09426165647ed67d3db43c1130e7a43430f9bf22 100644 (file)
@@ -333,12 +333,16 @@ void apply_rollback(apply_ctx_t *ctx)
                return;
        }
 
+       if (ctx->adjust_ptrs != NULL) {
+               ctx->adjust_ptrs->flags ^= ZONE_TREE_BINO_SECOND;
+       }
        if (ctx->node_ptrs != NULL) {
                ctx->node_ptrs->flags ^= ZONE_TREE_BINO_SECOND;
        }
        if (ctx->nsec3_ptrs != NULL) {
                ctx->nsec3_ptrs->flags ^= ZONE_TREE_BINO_SECOND;
        }
+       zone_trees_unify_binodes(ctx->adjust_ptrs, NULL, false);
        zone_trees_unify_binodes(ctx->node_ptrs, ctx->nsec3_ptrs, true);
 
        zone_tree_free(&ctx->node_ptrs);