Given the -C flag, set script-layer ignore_checksums to true.

This commit is contained in:
Christian Kreibich 2023-04-21 13:43:34 -07:00
parent 1a1feec887
commit ce4494d8d3

View file

@ -1010,6 +1010,17 @@ SetupResult setup(int argc, char** argv, Options* zopts)
exit(0);
}
if ( options.ignore_checksums )
{
const auto& id = global_scope()->Find("ignore_checksums");
if ( ! id )
reporter->InternalError("global ignore_checksums not defined");
id->SetVal(zeek::val_mgr->True());
ignore_checksums = 1;
}
// Print the ID.
if ( options.identifier_to_print )
{
@ -1082,9 +1093,6 @@ SetupResult setup(int argc, char** argv, Options* zopts)
g_frame_stack.pop_back();
}
if ( options.ignore_checksums )
ignore_checksums = 1;
if ( zeek_script_loaded )
{
// Queue events reporting loaded scripts.