diff --git a/CHANGES b/CHANGES index 94f9d34992..a944d89460 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,20 @@ + +3.3.0-dev.107 | 2020-08-12 20:01:37 +0000 + + * Accept bracketed ipv6 addresses (Justin Azoff, Corelight) + + * Fix minimize_info in ftp/main not returning a value. + Fixes GH-1120 (Johanna Amann, Corelight) + + * Fix config reader regular expression for MUSL (Seth Hall, Corelight) + + * Moved verb ACTION_DROP to base/frameworks/notice/main.zeek. + ACTION_DROP is not only part of catch-n-release subsystem and can be useful in other cases (Aashish Sharma) + + * Added new acld verbs of filter and nofilter (Aashish Sharma) + + * Fix some printf warnings with size_t values (Tim Wojtulewicz, Corelight) + 3.3.0-dev.97 | 2020-08-11 11:34:17 -0700 * Move Dict constants to detail namespace (Tim Wojtulewicz, Corelight) diff --git a/VERSION b/VERSION index 3a3a05a546..82f6583a08 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.3.0-dev.97 +3.3.0-dev.107 diff --git a/src/threading/Formatter.cc b/src/threading/Formatter.cc index 17e015452d..b5b0643676 100644 --- a/src/threading/Formatter.cc +++ b/src/threading/Formatter.cc @@ -80,9 +80,12 @@ threading::Value::addr_t Formatter::ParseAddr(const std::string &s) const else { val.family = IPv6; - if ( inet_pton(AF_INET6, s.c_str(), val.in.in6.s6_addr) <=0 ) + std::string clean_s = s; + if ( s.front() == '[' && s.back() == ']' ) + clean_s = s.substr(1, s.length() - 2); + if ( inet_pton(AF_INET6, clean_s.c_str(), val.in.in6.s6_addr) <= 0 ) { - thread->Warning(thread->Fmt("Bad address: %s", s.c_str())); + thread->Warning(thread->Fmt("Bad address: %s", clean_s.c_str())); memset(val.in.in6.s6_addr, 0, sizeof(val.in.in6.s6_addr)); } } diff --git a/testing/btest/Baseline/scripts.base.frameworks.config.basic/zeek.config.log b/testing/btest/Baseline/scripts.base.frameworks.config.basic/zeek.config.log index 469398c4a9..5eb6d40756 100644 --- a/testing/btest/Baseline/scripts.base.frameworks.config.basic/zeek.config.log +++ b/testing/btest/Baseline/scripts.base.frameworks.config.basic/zeek.config.log @@ -3,23 +3,26 @@ #empty_field (empty) #unset_field - #path config -#open 2020-07-06-18-21-36 +#open 2020-08-12-20-01-23 #fields ts id old_value new_value location #types time string string string string -1594059696.059713 testbool T F ../configfile -1594059696.059713 testcount 0 1 ../configfile -1594059696.059713 testcount 1 2 ../configfile -1594059696.059713 testint 0 -1 ../configfile -1594059696.059713 testenum SSH::LOG Conn::LOG ../configfile -1594059696.059713 testport 42/tcp 45/unknown ../configfile -1594059696.059713 testporttcp 40/udp 42/tcp ../configfile -1594059696.059713 testportudp 40/tcp 42/udp ../configfile -1594059696.059713 testaddr 127.0.0.1 127.0.0.1 ../configfile -1594059696.059713 testaddr 127.0.0.1 2607:f8b0:4005:801::200e ../configfile -1594059696.059713 testinterval 1.0 sec 1.0 min ../configfile -1594059696.059713 testtime 0.0 1507321987.0 ../configfile -1594059696.059713 test_set (empty) a,d,b,c,erdbeerschnitzel ../configfile -1594059696.059713 test_vector (empty) 1,2,3,4,5,6 ../configfile -1594059696.059713 test_set a,d,b,c,erdbeerschnitzel (empty) ../configfile -1594059696.059713 test_set (empty) \x2d ../configfile -#close 2020-07-06-18-21-36 +1597262483.997269 testbool T F ../configfile +1597262483.997269 testcount 0 1 ../configfile +1597262483.997269 testcount 1 2 ../configfile +1597262483.997513 testint 0 -1 ../configfile +1597262483.997513 testenum SSH::LOG Conn::LOG ../configfile +1597262483.997513 testport 42/tcp 45/unknown ../configfile +1597262483.997513 testporttcp 40/udp 42/tcp ../configfile +1597262483.997513 testportudp 40/tcp 42/udp ../configfile +1597262483.997513 testaddr 127.0.0.1 127.0.0.1 ../configfile +1597262483.997513 testaddr 127.0.0.1 2607:f8b0:4005:801::1 ../configfile +1597262483.997513 testaddr 2607:f8b0:4005:801::1 2607:f8b0:4005:801::2 ../configfile +1597262483.997513 testsub 0.0.0.0/0 2607:f8b0:4001::/48 ../configfile +1597262483.997513 testsub 2607:f8b0:4001::/48 2607:f8b0:4002::/48 ../configfile +1597262483.997513 testinterval 1.0 sec 1.0 min ../configfile +1597262483.997513 testtime 0.0 1507321987.0 ../configfile +1597262483.997513 test_set (empty) a,d,b,c,erdbeerschnitzel ../configfile +1597262483.997513 test_vector (empty) 1,2,3,4,5,6 ../configfile +1597262483.997513 test_set a,d,b,c,erdbeerschnitzel (empty) ../configfile +1597262483.997513 test_set (empty) \x2d ../configfile +#close 2020-08-12-20-01-24 diff --git a/testing/btest/scripts/base/frameworks/config/basic.zeek b/testing/btest/scripts/base/frameworks/config/basic.zeek index 0195388792..384d4a3303 100644 --- a/testing/btest/scripts/base/frameworks/config/basic.zeek +++ b/testing/btest/scripts/base/frameworks/config/basic.zeek @@ -20,7 +20,10 @@ testport 45 testporttcp 42/tcp testportudp 42/udp testaddr 127.0.0.1 -testaddr 2607:f8b0:4005:801::200e +testaddr 2607:f8b0:4005:801::1 +testaddr [2607:f8b0:4005:801::2] +testsub 2607:f8b0:4001:801::/48 +testsub [2607:f8b0:4002:801::]/48 testinterval 60 testtime 1507321987 test_set a,b,c,d,erdbeerschnitzel @@ -41,6 +44,7 @@ export { option testporttcp = 40/udp; option testportudp = 40/tcp; option testaddr = 127.0.0.1; + option testsub = 0.0.0.0/0; option testtime = network_time(); option testinterval = 1sec; option teststring = "a";