diff --git a/CMakeLists.txt b/CMakeLists.txt index 2a0510ea29..aa5f6e7621 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -189,6 +189,46 @@ if (MISSING_PREREQS) message(FATAL_ERROR "Configuration aborted due to missing prerequisites") endif () +if ( CAF_ROOT_DIR ) + find_package(CAF COMPONENTS core io openssl REQUIRED) +endif () + +add_subdirectory(aux/paraglob) +set(zeekdeps ${zeekdeps} paraglob) + +if ( BROKER_ROOT_DIR ) + # Avoid calling find_package(CAF) twice. + if ( NOT CAF_ROOT_DIR ) + find_package(CAF COMPONENTS core io openssl REQUIRED) + endif () + find_package(Broker REQUIRED) + set(zeekdeps ${zeekdeps} ${BROKER_LIBRARY}) + set(broker_includes ${BROKER_INCLUDE_DIR}) +else () + set(ENABLE_STATIC_ONLY_SAVED ${ENABLE_STATIC_ONLY}) + + if ( BUILD_STATIC_BROKER ) + set(ENABLE_STATIC_ONLY true) + endif() + + add_subdirectory(aux/broker) + set(ENABLE_STATIC_ONLY ${ENABLE_STATIC_ONLY_SAVED}) + + if ( BUILD_STATIC_BROKER ) + set(zeekdeps ${zeekdeps} broker_static) + else() + set(zeekdeps ${zeekdeps} broker) + endif() + set(broker_includes ${CMAKE_CURRENT_SOURCE_DIR}/aux/broker/include ${CMAKE_CURRENT_BINARY_DIR}/aux/broker/include) +endif () + +# CAF_LIBRARIES and CAF_INCLUDE_DIRS are defined either by calling +# find_package(CAF) or by calling add_subdirectory(aux/broker). In either case, +# we have to care about CAF here because Broker headers can pull in CAF +# headers. +set(zeekdeps ${zeekdeps} ${CAF_LIBRARIES}) +include_directories(BEFORE ${broker_includes} ${CAF_INCLUDE_DIRS}) +include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/aux/paraglob/include) include_directories(BEFORE ${PCAP_INCLUDE_DIR} ${BIND_INCLUDE_DIR} @@ -262,7 +302,7 @@ if ( ${CMAKE_SYSTEM_NAME} MATCHES Linux AND EXISTS /etc/os-release ) endif () endif () -set(zeekdeps +set(zeekdeps ${zeekdeps} ${BinPAC_LIBRARY} ${PCAP_LIBRARY} ${OPENSSL_LIBRARIES} @@ -347,48 +387,6 @@ InstallSymlink("${CMAKE_INSTALL_PREFIX}/bin/zeek-wrapper" "${CMAKE_INSTALL_PREFI ######################################################################## ## Recurse on sub-directories -if ( CAF_ROOT_DIR ) - find_package(CAF COMPONENTS core io openssl REQUIRED) -endif () - -if ( BROKER_ROOT_DIR ) - # Avoid calling find_package(CAF) twice. - if ( NOT CAF_ROOT_DIR ) - find_package(CAF COMPONENTS core io openssl REQUIRED) - endif () - find_package(Broker REQUIRED) - set(zeekdeps ${zeekdeps} ${BROKER_LIBRARY}) - include_directories(BEFORE ${BROKER_INCLUDE_DIR}) -else () - set(ENABLE_STATIC_ONLY_SAVED ${ENABLE_STATIC_ONLY}) - - if ( BUILD_STATIC_BROKER ) - set(ENABLE_STATIC_ONLY true) - endif() - - add_subdirectory(aux/broker) - set(ENABLE_STATIC_ONLY ${ENABLE_STATIC_ONLY_SAVED}) - - if ( BUILD_STATIC_BROKER ) - set(zeekdeps ${zeekdeps} broker_static) - else() - set(zeekdeps ${zeekdeps} broker) - endif() - include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/aux/broker/include - ${CMAKE_CURRENT_BINARY_DIR}/aux/broker/include) -endif () - -# CAF_LIBRARIES and CAF_INCLUDE_DIRS are defined either by calling -# find_package(CAF) or by calling add_subdirectory(aux/broker). In either case, -# we have to care about CAF here because Broker headers can pull in CAF -# headers. -set(zeekdeps ${zeekdeps} ${CAF_LIBRARIES}) -include_directories(BEFORE ${CAF_INCLUDE_DIRS}) - -add_subdirectory(aux/paraglob) -set(zeekdeps ${zeekdeps} paraglob) -include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/aux/paraglob/include) - add_subdirectory(src) add_subdirectory(scripts) add_subdirectory(man) diff --git a/src/Sessions.cc b/src/Sessions.cc index d3042784a0..7639152ab0 100644 --- a/src/Sessions.cc +++ b/src/Sessions.cc @@ -3,6 +3,7 @@ #include "zeek-config.h" +#include #include #include diff --git a/src/analyzer/protocol/dns/DNS.cc b/src/analyzer/protocol/dns/DNS.cc index 5c35e4f271..eab5b48461 100644 --- a/src/analyzer/protocol/dns/DNS.cc +++ b/src/analyzer/protocol/dns/DNS.cc @@ -5,6 +5,7 @@ #include #include #include +#include #include #include "NetVar.h" diff --git a/testing/btest/Traces/dce-rpc/ntlm-empty-av-sequence.pcap b/testing/btest/Traces/dce-rpc/ntlm-empty-av-sequence.pcap index 2d7e7631f9..bc8253d681 100644 Binary files a/testing/btest/Traces/dce-rpc/ntlm-empty-av-sequence.pcap and b/testing/btest/Traces/dce-rpc/ntlm-empty-av-sequence.pcap differ diff --git a/testing/btest/Traces/dce-rpc/ntlm-unterminated-av-sequence.pcap b/testing/btest/Traces/dce-rpc/ntlm-unterminated-av-sequence.pcap index 55a9819f3c..136f755403 100644 Binary files a/testing/btest/Traces/dce-rpc/ntlm-unterminated-av-sequence.pcap and b/testing/btest/Traces/dce-rpc/ntlm-unterminated-av-sequence.pcap differ diff --git a/testing/btest/Traces/erspanII.pcap b/testing/btest/Traces/erspanII.pcap index c601f29781..4ce446af8c 100644 Binary files a/testing/btest/Traces/erspanII.pcap and b/testing/btest/Traces/erspanII.pcap differ diff --git a/testing/btest/Traces/radius/radius_localhost.pcap b/testing/btest/Traces/radius/radius_localhost.pcap new file mode 100644 index 0000000000..7333fc9c96 Binary files /dev/null and b/testing/btest/Traces/radius/radius_localhost.pcap differ diff --git a/testing/btest/Traces/radius/radius_localhost.pcapng b/testing/btest/Traces/radius/radius_localhost.pcapng deleted file mode 100644 index 0de5c46dcd..0000000000 Binary files a/testing/btest/Traces/radius/radius_localhost.pcapng and /dev/null differ diff --git a/testing/btest/Traces/rfb/vncmac.pcap b/testing/btest/Traces/rfb/vncmac.pcap index 026078185d..2970fe92ad 100644 Binary files a/testing/btest/Traces/rfb/vncmac.pcap and b/testing/btest/Traces/rfb/vncmac.pcap differ diff --git a/testing/btest/Traces/smb/smb3.pcap b/testing/btest/Traces/smb/smb3.pcap index 3c1800ea19..0adc7740e1 100644 Binary files a/testing/btest/Traces/smb/smb3.pcap and b/testing/btest/Traces/smb/smb3.pcap differ diff --git a/testing/btest/Traces/smb/smb311.pcap b/testing/btest/Traces/smb/smb311.pcap index b6f4521676..466924c000 100644 Binary files a/testing/btest/Traces/smb/smb311.pcap and b/testing/btest/Traces/smb/smb311.pcap differ diff --git a/testing/btest/Traces/smtp-multi-addr.pcap b/testing/btest/Traces/smtp-multi-addr.pcap index 5651d045a9..0029d98532 100644 Binary files a/testing/btest/Traces/smtp-multi-addr.pcap and b/testing/btest/Traces/smtp-multi-addr.pcap differ diff --git a/testing/btest/Traces/smtp.trace b/testing/btest/Traces/smtp.trace index 3d07e83da2..25b09e5d73 100644 Binary files a/testing/btest/Traces/smtp.trace and b/testing/btest/Traces/smtp.trace differ diff --git a/testing/btest/Traces/tcp/tcp-fast-open.pcap b/testing/btest/Traces/tcp/tcp-fast-open.pcap index 88e9a99b0d..2893440fa2 100644 Binary files a/testing/btest/Traces/tcp/tcp-fast-open.pcap and b/testing/btest/Traces/tcp/tcp-fast-open.pcap differ diff --git a/testing/btest/Traces/tls/hrr.pcap b/testing/btest/Traces/tls/hrr.pcap index d3d55ded24..fa64ab693a 100644 Binary files a/testing/btest/Traces/tls/hrr.pcap and b/testing/btest/Traces/tls/hrr.pcap differ diff --git a/testing/btest/Traces/tls/tls13_psk_succesfull.pcap b/testing/btest/Traces/tls/tls13_psk_succesfull.pcap index cdf7fcf132..ccd9dcebfd 100644 Binary files a/testing/btest/Traces/tls/tls13_psk_succesfull.pcap and b/testing/btest/Traces/tls/tls13_psk_succesfull.pcap differ diff --git a/testing/btest/language/nested-sets.zeek b/testing/btest/language/nested-sets.zeek index 8c4f987075..1e83b6184d 100644 --- a/testing/btest/language/nested-sets.zeek +++ b/testing/btest/language/nested-sets.zeek @@ -1,6 +1,29 @@ -# @TEST-EXEC: for i in `seq 21`; do echo 0 >> random.seed; done # @TEST-EXEC: test `zeek -b -G random.seed %INPUT` = "pass" +@TEST-START-FILE random.seed +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +@TEST-END-FILE + type r: record { b: set[count]; }; diff --git a/testing/btest/scripts/base/frameworks/logging/ascii-gz.zeek b/testing/btest/scripts/base/frameworks/logging/ascii-gz.zeek index 37757a638e..2bbde57bbb 100644 --- a/testing/btest/scripts/base/frameworks/logging/ascii-gz.zeek +++ b/testing/btest/scripts/base/frameworks/logging/ascii-gz.zeek @@ -1,6 +1,7 @@ # # @TEST-EXEC: zeek -b %INPUT -# @TEST-EXEC: gunzip -S .gzip ssh.log.gzip +# @TEST-EXEC: mv ssh.log.gzip ssh.log.gz +# @TEST-EXEC: gunzip ssh.log.gz # @TEST-EXEC: btest-diff ssh.log # @TEST-EXEC: btest-diff ssh-uncompressed.log # diff --git a/testing/btest/scripts/base/protocols/radius/radius-multiple-attempts.test b/testing/btest/scripts/base/protocols/radius/radius-multiple-attempts.test index 6456e58fe2..3ea5634ed8 100644 --- a/testing/btest/scripts/base/protocols/radius/radius-multiple-attempts.test +++ b/testing/btest/scripts/base/protocols/radius/radius-multiple-attempts.test @@ -1,6 +1,6 @@ # Test a more complicated radius session with multiple attempts -# @TEST-EXEC: zeek -b -C -r $TRACES/radius/radius_localhost.pcapng %INPUT +# @TEST-EXEC: zeek -b -C -r $TRACES/radius/radius_localhost.pcap %INPUT # @TEST-EXEC: btest-diff radius.log @load base/protocols/radius