mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 07:38:19 +00:00
zeek-setup: Exit when rule loading tickles reporter errors
With custom events for signatures, Reporter::error() may be invoked while loading them. Early exit in case that happens. We could continue and either disable the signatures or fallback to the default signature_match() event, but not sure that would be obviously better.
This commit is contained in:
parent
b795c0bfc1
commit
d11ac929af
1 changed files with 1 additions and 1 deletions
|
@ -891,7 +891,7 @@ SetupResult setup(int argc, char** argv, Options* zopts) {
|
||||||
|
|
||||||
if ( ! all_signature_files.empty() ) {
|
if ( ! all_signature_files.empty() ) {
|
||||||
rule_matcher = new RuleMatcher(options.signature_re_level);
|
rule_matcher = new RuleMatcher(options.signature_re_level);
|
||||||
if ( ! rule_matcher->ReadFiles(all_signature_files) ) {
|
if ( ! rule_matcher->ReadFiles(all_signature_files) || zeek::reporter->Errors() > 0 ) {
|
||||||
early_shutdown();
|
early_shutdown();
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue