mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 23:58:20 +00:00
Adding missing check that a plugin's API version matches what Bro defines.
This commit is contained in:
parent
024c26d982
commit
382b946098
5 changed files with 27 additions and 9 deletions
|
@ -219,6 +219,10 @@ bool Manager::ActivateDynamicPluginInternal(const std::string& name, bool ok_if_
|
|||
current_plugin->SetDynamic(true);
|
||||
current_plugin->DoConfigure();
|
||||
|
||||
if ( current_plugin->APIVersion() != BRO_PLUGIN_API_VERSION )
|
||||
reporter->FatalError("plugin's API version does not match Bro (expected %d, got %d in %s)",
|
||||
BRO_PLUGIN_API_VERSION, current_plugin->APIVersion(), path);
|
||||
|
||||
// We execute the pre-script initialization here; this in
|
||||
// fact could be *during* script initialization if we got
|
||||
// triggered via @load-plugin.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue