]> git.ipfire.org Git - thirdparty/bind9.git/commit
provide a context structure for plugin_register()
authorColin Vidal <colin@isc.org>
Fri, 26 Sep 2025 13:54:51 +0000 (15:54 +0200)
committerColin Vidal <colin@isc.org>
Wed, 1 Oct 2025 09:11:00 +0000 (11:11 +0200)
commit25e258fb0bd812f093850995118a4ca2e825c96b
tree26053bbe51412241727c70bb5b20d684748ce450
parent0e575d150fdbd06b426a3eee6aa57f3cda1ae641
provide a context structure for plugin_register()

This commit introduces a new type, ns_pluginregister_ctx_t,
which is passed to plugin_check() and plugin_register() in place of the
'source' parameter. The source value is now just part of the structure,
which also holds a pointer to the zone origin if the plugin is loaded at
a zone level.

This provides more contextual information, enabling the plugin to make
specific configuration decisions based on the name of the zone for which
it is loaded.

It's also flexible if more contextual data are needed in the future:
add a new field to ns_pluginregister_ctx_t, and new plugins can use
it without affecting compatibility with existing plugins.
bin/named/server.c
bin/named/zoneconf.c
bin/plugins/filter-a.c
bin/plugins/filter-aaaa.c
bin/tests/system/hooks/driver/test-async.c
bin/tests/system/hooks/driver/test-syncplugin.c
lib/isccfg/check.c
lib/ns/hooks.c
lib/ns/include/ns/hooks.h