plugin_version
Marcus Kool
marcus.kool at urlfilterdb.com
Thu Dec 15 19:10:08 UTC 2022
Hi,
I have written a plugin for named and was wondering what the policy behind the usage of plugin_version() is and what kind of compatibility check it intends to perform.
It is common for plugins to use query_ctx_t and its members fname, view, client (client.message, client.query) etc.
Since these data structures may change between (patch) versions, a plugin compiled for version A can get a SEGV signal because a data structure changed and the plugin is used inside named version B.
I have little experience with data structure changes of named and observed only the addition of refresh_rrset in query_ctx (somewhere between 9.16.1 and 9.16.35) which did not cause an issue since its
1-byte size did not change offsets of most members inside the query_ctx struct.
In our plugin, plugin_register() checks for the major and minor version number in named_g_version so a plugin compiled with 9.16.x refuses to initialize inside a 9.18.y named process and vice versa.
But I have the impression that this might not be a 100% guarantee that all is well.
Because we like to release as few as possible versions of the plugin I have a second question: how can we be sure that a plugin compiled with 9.X.1 will have no issues accessing named data structures
for all patch versions of 9.X?
Thanks,
Marcus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/bind-users/attachments/20221215/9658c594/attachment.htm>
More information about the bind-users
mailing list