mirror of
https://github.com/zeek/zeek.git
synced 2025-10-08 17:48:21 +00:00
Fix registration of protocol analyzers from inside plugins.
With the recent packet manager work, it broke to register a protocol analyzer for a specific port from inside a plugin's initialization code. That's because that registration now depends on the packet manager being set up, which isn't case at that time a plugin's `InitPostInit()` runs. This fix contains two parts: - Initialize the packet manager before the analyzer manager, so that the latter's `InitPostScript()` can rely on the former being ready. - Change the analyzer manager to (only) record port registrations happening before it's fully initialized. Its `InitPostScript()` then performs the actual registrations, knowing it can use the packet manager now. This comes with a `cmake/` to add a missing include directory.
This commit is contained in:
parent
6e3d2d4516
commit
a7343ee019
9 changed files with 59 additions and 7 deletions
|
@ -10,6 +10,8 @@ class Plugin : public zeek::plugin::Plugin
|
|||
protected:
|
||||
// Overridden from zeek::plugin::Plugin.
|
||||
zeek::plugin::Configuration Configure() override;
|
||||
|
||||
void InitPostScript() override;
|
||||
};
|
||||
|
||||
extern Plugin plugin;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue