mirror of
https://github.com/zeek/zeek.git
synced 2025-10-16 05:28:20 +00:00
GH-165: Fix global initializations that indirectly use builtin types
This commit is contained in:
parent
4a8640d702
commit
5ed13284c3
7 changed files with 30 additions and 4 deletions
|
@ -0,0 +1 @@
|
|||
tcp and port 80
|
|
@ -0,0 +1,14 @@
|
|||
# @TEST-EXEC: zeek -b %INPUT >out
|
||||
# @TEST-EXEC: btest-diff out
|
||||
|
||||
# This test isn't specifically testing the PacketFilter functionality, rather
|
||||
# that a global variable can be initialized using a BIF call and that BIF call
|
||||
# can make use of some global type pointers to builtin types/aliases.
|
||||
|
||||
@load base/frameworks/packet-filter
|
||||
redef PacketFilter::restricted_filter = PacketFilter::port_to_bpf(80/tcp);
|
||||
|
||||
event zeek_init()
|
||||
{
|
||||
print PacketFilter::restricted_filter;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue