mirror of
https://github.com/zeek/zeek.git
synced 2025-10-03 07:08:19 +00:00

When an anonymoys function was defined inside an initialization context, that context transfered over to the function body and could lead to spurious error messages.
16 lines
516 B
Text
16 lines
516 B
Text
# @TEST-EXEC: bro -r ${TRACES}/wikipedia.trace %INPUT >out
|
|
# @TEST-EXEC: btest-diff http.log
|
|
|
|
module Foo;
|
|
|
|
event bro_init() {
|
|
|
|
Log::remove_default_filter(HTTP::LOG);
|
|
|
|
local filter: Log::Filter = [$name = "http",
|
|
$pred = function(rec: HTTP::Info): bool {
|
|
rec$id$orig_h = remask_addr(rec$id$orig_h, 0.0.0.0, 112);
|
|
return T;
|
|
}];
|
|
Log::add_filter(HTTP::LOG, filter);
|
|
}
|