mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Merge remote-tracking branch 'anniebryan/notice-suppression-bug-fix'
* anniebryan/notice-suppression-bug-fix: Added test case with back-to-back notices Fix notice suppression atomicity bug
This commit is contained in:
commit
9524963da6
4 changed files with 11 additions and 3 deletions
6
CHANGES
6
CHANGES
|
@ -1,3 +1,9 @@
|
||||||
|
5.1.0-dev.341 | 2022-08-05 16:21:13 +0000
|
||||||
|
|
||||||
|
* Added test case with back-to-back notices (Annie Bryan)
|
||||||
|
|
||||||
|
* Fix notice suppression atomicity bug (Annie Bryan)
|
||||||
|
|
||||||
5.1.0-dev.337 | 2022-08-05 16:19:59 +0000
|
5.1.0-dev.337 | 2022-08-05 16:19:59 +0000
|
||||||
|
|
||||||
* GH-2034: Store module names and use them in lookups for ifdef (Tim Wojtulewicz, Corelight)
|
* GH-2034: Store module names and use them in lookups for ifdef (Tim Wojtulewicz, Corelight)
|
||||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
5.1.0-dev.337
|
5.1.0-dev.341
|
||||||
|
|
|
@ -538,6 +538,7 @@ hook Notice::notice(n: Notice::Info) &priority=-5
|
||||||
n$suppress_for != 0secs )
|
n$suppress_for != 0secs )
|
||||||
{
|
{
|
||||||
event Notice::begin_suppression(n$ts, n$suppress_for, n$note, n$identifier);
|
event Notice::begin_suppression(n$ts, n$suppress_for, n$note, n$identifier);
|
||||||
|
suppressing[n$note, n$identifier] = n$ts + n$suppress_for;
|
||||||
@if ( Cluster::is_enabled() && Cluster::local_node_type() != Cluster::MANAGER )
|
@if ( Cluster::is_enabled() && Cluster::local_node_type() != Cluster::MANAGER )
|
||||||
event Notice::manager_begin_suppression(n$ts, n$suppress_for, n$note, n$identifier);
|
event Notice::manager_begin_suppression(n$ts, n$suppress_for, n$note, n$identifier);
|
||||||
@endif
|
@endif
|
||||||
|
|
|
@ -10,7 +10,7 @@ redef enum Notice::Type += {
|
||||||
# The second notice needs to be scheduled due to how the notice framework
|
# The second notice needs to be scheduled due to how the notice framework
|
||||||
# uses the event queue.
|
# uses the event queue.
|
||||||
|
|
||||||
event second_notice()
|
event third_notice()
|
||||||
{
|
{
|
||||||
NOTICE([$note=Test_Notice, $msg="another test", $identifier="static"]);
|
NOTICE([$note=Test_Notice, $msg="another test", $identifier="static"]);
|
||||||
}
|
}
|
||||||
|
@ -18,6 +18,7 @@ event second_notice()
|
||||||
event zeek_init()
|
event zeek_init()
|
||||||
{
|
{
|
||||||
NOTICE([$note=Test_Notice, $msg="test", $identifier="static"]);
|
NOTICE([$note=Test_Notice, $msg="test", $identifier="static"]);
|
||||||
schedule 1msec { second_notice() };
|
NOTICE([$note=Test_Notice, $msg="test again", $identifier="static"]);
|
||||||
|
schedule 1msec { third_notice() };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue