mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Fix language.init-in-anon-function btest due to changes to log filter predicates
This commit is contained in:
parent
4ce3bf3cd2
commit
00868e00d3
1 changed files with 3 additions and 12 deletions
|
@ -1,18 +1,9 @@
|
||||||
# @TEST-EXEC: zeek -b -r ${TRACES}/wikipedia.trace %INPUT >out
|
# @TEST-EXEC: zeek -b -r ${TRACES}/wikipedia.trace %INPUT >out
|
||||||
# @TEST-EXEC: btest-diff http.log
|
# @TEST-EXEC: btest-diff http.log
|
||||||
|
|
||||||
@load base/protocols/http
|
@load base/protocols/http
|
||||||
|
|
||||||
module Foo;
|
module Foo;
|
||||||
|
|
||||||
event zeek_init() {
|
hook HTTP::log_policy(rec: HTTP::Info, id: Log::ID, filter: Log::Filter) {
|
||||||
|
rec$id$orig_h = remask_addr(rec$id$orig_h, 0.0.0.0, 112);
|
||||||
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);
|
|
||||||
}
|
|
Loading…
Add table
Add a link
Reference in a new issue