]> git.ipfire.org Git - thirdparty/bind9.git/commit
chg: dev: provide more context when registering plugins
authorColin Vidal <colin@isc.org>
Wed, 1 Oct 2025 09:52:14 +0000 (11:52 +0200)
committerColin Vidal <colin@isc.org>
Wed, 1 Oct 2025 09:52:14 +0000 (11:52 +0200)
commitac4cf4cce8d616060d093fb3575e0c136ddcbd1a
tree7ed71f7b9d20831f1a394a603f925f6827ccf25a
parent0e575d150fdbd06b426a3eee6aa57f3cda1ae641
parentb6758cf695b04294f11819c277b6295c14038e9b
chg: dev: provide more context when registering plugins

Add a new type, `ns_pluginregister_ctx_t`, which is passed to `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.

Closes #5533

Merge branch '5533-plugin-register-ctx' into 'main'

See merge request isc-projects/bind9!11019