]> git.ipfire.org Git - zone-sync.git/commitdiff
main: Unconditionally dump the zone 0.0.1
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 19 May 2026 16:22:34 +0000 (16:22 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 19 May 2026 16:22:34 +0000 (16:22 +0000)
dns_zone_flush() does not always write the zone data. Since we call it
at point where we have definitely received some data (i.e. the zone has
changed), we can just force to dump it.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
main.c

diff --git a/main.c b/main.c
index c391796b94a553b704d0843fe1a479fed411d89c..02a4db22e1c422312ecfcc3285256e2e54b5ceb0 100644 (file)
--- a/main.c
+++ b/main.c
@@ -289,7 +289,7 @@ static void transfer_done(dns_zone_t* zone, uint32_t* expireopt, isc_result_t re
                        INFO("%s: Transfer successful\n", name);
 
                        // Commit any changes
-                       r = dns_zone_flush(zone);
+                       r = dns_zone_dump(zone);
                        if (r) {
                                ERROR("%s: Failed to flush zone\n", name);
                                ctx.rc = 1;