GH-165: Fix global initializations that indirectly use builtin types

This commit is contained in:
Jon Siwek 2020-08-27 14:01:08 -07:00
parent 4a8640d702
commit 5ed13284c3
7 changed files with 30 additions and 4 deletions

View file

@ -0,0 +1 @@
tcp and port 80

View file

@ -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;
}