From 6f3e3a10e6bda4acfff94c25e3cbe9df8a1a2760 Mon Sep 17 00:00:00 2001 From: Arne Welzel Date: Wed, 11 Oct 2023 12:31:58 +0200 Subject: [PATCH] zeekygen: Disable zeek_init() handlers causing error output These modules have zeek_init() handlers with actual logic that has side-effects and error outputs. Just disable them during zeekygen runs. --- scripts/zeekygen/__load__.zeek | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/zeekygen/__load__.zeek b/scripts/zeekygen/__load__.zeek index 2cfa93d48b..80a530bc3b 100644 --- a/scripts/zeekygen/__load__.zeek +++ b/scripts/zeekygen/__load__.zeek @@ -21,7 +21,14 @@ @load ./example.zeek -event zeek_init() +event zeek_init() &priority=1000 { + # Disable events in modules that use zeek_init() to do stuff and may + # fail when run under zeekygen. For the purpose of zeekygen, we could + # probably disable all modules, too. + disable_module_events("Control"); + disable_module_events("Management::Agent::Runtime"); + disable_module_events("Management::Controller::Runtime"); + disable_module_events("Management::Node"); terminate(); }