mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 15:48:19 +00:00

This is to avoid ambiguity between compressed hex notation and module namespacing, both which use "::". E.g.: "aaaa::bbbb" could be an identifier or an IPv6 address, but "[aaaa::bbbb]" is now clearly the address. Also added IPv6 mixed notation to allow an IPv4 dotted-decimal address to be specified in the lower 32-bits.
11 lines
305 B
Text
11 lines
305 B
Text
# @TEST-EXEC: bro -b %INPUT >output 2>error
|
|
# @TEST-EXEC: btest-diff output
|
|
# @TEST-EXEC: btest-diff error
|
|
|
|
global sn: subnet;
|
|
sn = to_subnet("10.0.0.0/8");
|
|
print sn, sn == 10.0.0.0/8;
|
|
sn = to_subnet("2607:f8b0::/32");
|
|
print sn, sn == [2607:f8b0::]/32;
|
|
sn = to_subnet("10.0.0.0");
|
|
print sn, sn == [::]/0;
|