]> git.ipfire.org Git - thirdparty/bind9.git/commit
Abstract updates into a vtable
authorAlessio Podda <alessio@isc.org>
Fri, 24 Oct 2025 22:47:42 +0000 (00:47 +0200)
committerAlessio Podda <alessio@isc.org>
Tue, 9 Dec 2025 11:55:30 +0000 (12:55 +0100)
commite36dc0ca761898ff951d101281bbf39bf2535ec5
tree98aad3a838ef45ab6d30fc1038017419325da192
parent6f726ae3db00e98f063302363b39fa41a5a7a8d3
Abstract updates into a vtable

This commit adds a layer of indirection to the apply_diff logic used by
IXFR and resigning by having the database updates go through a vtable.

We do this in three steps:
 - We extend dns_rdatacallbacks_t vtable to allow subtraction and
   resigning.
 - We add a new set of api (begin|commit|abort)update to the dbmethods
   vtable, that model an incremental update that can be aborted.
 - We extract the core logic of diff_apply into a function that
   satisfies the new interface.
 - We make diff_apply use this new function, and log the results.

The intent of this commit is to allow databases to expose a batch
incremental update implementation, just like they expose a custom
batch creation implementation through (begin|end)load.
lib/dns/db.c
lib/dns/diff.c
lib/dns/include/dns/callbacks.h
lib/dns/include/dns/db.h
lib/dns/include/dns/diff.h
lib/dns/include/dns/types.h
lib/dns/master.c
lib/dns/qpzone.c
lib/dns/xfrin.c