Commit graph

11634 commits

Author SHA1 Message Date
Jon Siwek
31f60853c9 GH-646: add new "successful_connection_remove" event
And switch Zeek's base scripts over to using it in place of
"connection_state_remove".  The difference between the two is
that "connection_state_remove" is raised for all events while
"successful_connection_remove" excludes TCP connections that were never
established (just SYN packets).  There can be performance benefits
to this change for some use-cases.

There's also a new event called ``connection_successful`` and a new
``connection`` record field named "successful" to help indicate this new
property of connections.
2019-11-11 19:52:59 -08:00
Jon Siwek
75588956fc Updating submodule(s).
[nomail]
2019-11-11 13:49:26 -08:00
Jon Siwek
eaa1350656 Update embedded CAF to 0.17.3 2019-11-11 13:40:31 -08:00
Jon Siwek
0c71715cf4 Adjust btests for OpenBSD portability 2019-11-08 17:32:44 -08:00
Jon Siwek
7965dcd041 Convert pcapng test suite files to pcap format
The former isn't supported by default on OpenBSD.
2019-11-08 13:08:06 -08:00
Jon Siwek
b182c35762 Fix undefined symbols loading libbroker on OpenBSD
python3.7:/usr/local/lib/libbroker.so.2: undefined symbol '__inet_ntop'
python3.7:/usr/local/lib/libbroker.so.2: undefined symbol '__inet_pton'

An independent Broker build doesn't have that problem because it
usually picks up those functions from libc.  But when building Broker
as part of Zeek, include search paths were already modified to reflect
Zeek's libbind dependency and Broker ends up using libbind headers
which defines its own version of these, but then does not link to
libbind (since it's a dependency of Zeek, not Broker) to actually get
those symbols (e.g. when dlopen'ing independently from Zeek, like for
the Python bindings).  Solution is to re-order include_directories()
for Zeek dependencies such that they won't effect sub-projects.
2019-11-08 12:30:56 -08:00
Jon Siwek
11028f45a7 Fix compile warnings on OpenBSD
warning: '__inet_makeaddr' has C-linkage specified, but returns
incomplete type 'struct in_addr' which could be incompatible with C
2019-11-08 12:29:12 -08:00
Jon Siwek
afb8bc6df8 Fix ZEEK_PROFILER_FILE file format/parsing
Some Zeek script statement descriptions were exceeding the hardcoded
maximum length and also could contain tab characters which were
supposed to be reserved for use as a delimiter in the file format.
2019-11-07 16:47:09 -08:00
Johanna Amann
b86a8acc2b Merge remote-tracking branch 'origin/topic/jsiwek/improve-record-fields-bif'
* origin/topic/jsiwek/improve-record-fields-bif:
  Allow record_fields() string arguments that name a record type
2019-11-07 13:49:14 -08:00
Jon Siwek
43a2ee8187 Updating submodule(s).
[nomail]
2019-11-06 22:28:24 -08:00
Jon Siwek
8aa77436f9 Refactor misc. Supervisor code
E.g. mostly to start taking advantage of C++17 things like
std::optional.  Also IntrusivePtr.
2019-11-05 19:29:43 -08:00
Jon Siwek
c43ffc14fe Fix misc. Supervisor bugs
- Stem environment wasn't inherited if it needs to be exec()'d
- Fix node creation message format when reviving Stem via exec()
- Cluster node type for workers was set wrong
2019-11-05 14:12:55 -08:00
Jon Siwek
cc37e505e4 Merge remote-tracking branch 'origin/master' into topic/jsiwek/supervisor 2019-11-05 10:11:47 -08:00
Jon Siwek
5cece12333 Merge remote-tracking branch 'origin/topic/neverlord/intrusive-ptr'
* origin/topic/neverlord/intrusive-ptr:
  Add API documentation to IntrusivePtr
  Rename make{ Counted => _intrusive }
  Remove braces around single return statements
  Integrate review feedback
  Add and use new IntrusivePt type in Zeek
2019-11-05 09:56:07 -08:00
Jon Siwek
872adda5b1 Merge branch 'topic/jsbarber/ftp-cluster-fix-patch' of https://github.com/jsbarber/zeek
Minor cleanup in merge: remove print statements and unnecessary @if
directive.

* 'topic/jsbarber/ftp-cluster-fix-patch' of https://github.com/jsbarber/zeek:
  Publish ftp_data_expected updates to other workers for synchronization
2019-11-04 17:31:59 -08:00
Jon Siwek
1afcb5c993 Merge remote-tracking branch 'origin/topic/neverlord/object-libraries'
* origin/topic/neverlord/object-libraries:
  Update CMake submodule
  Use object libraries for subdir libs and plugins
2019-11-04 16:57:37 -08:00
Jon Siwek
e34562df48 Fix error handling in decode_base64() 2019-11-04 10:00:17 -08:00
Jon Siwek
b6def63167 Revert "Merge remote-tracking branch 'origin/topic/dev/bugrpone-narrowing-conversions-base64'"
This reverts commit 705210a035.
The original changes broke the Base64.h API which may be used by
external plugins.

Fixes GH-676
2019-11-04 09:47:56 -08:00
Jon Siwek
33c26e9ea3 Use #pragma once in Base64.h 2019-11-01 15:59:15 -07:00
Jon Siwek
63fe835acf Allow record_fields() string arguments that name a record type 2019-11-01 12:46:17 -07:00
Jon Siwek
295c28b48e Merge remote-tracking branch 'origin/topic/jsiwek/fix-coverity-ci'
* origin/topic/jsiwek/fix-coverity-ci:
  Fix Travis CI script to run Coverity build in container
2019-10-31 12:18:49 -07:00
Jon Siwek
8d31baf3b7 Fix Travis CI script to run Coverity build in container
It was previously running on the host and didn't have adequate compiler
to do C++17.
2019-10-31 12:09:18 -07:00
Dominik Charousset
3338cfb1cb Update CMake submodule 2019-10-31 11:22:36 +01:00
Dominik Charousset
25aadd82ef Use object libraries for subdir libs and plugins 2019-10-31 10:58:51 +01:00
Johanna Amann
6775463f13 Merge remote-tracking branch 'origin/topic/jsiwek/remove-header-usings'
* origin/topic/jsiwek/remove-header-usings:
  Remove "using namespace std" from header files
2019-10-31 06:37:52 +01:00
Jon Siwek
49c59ceb99 GH-649: define missing DLT_NFLOG to support OpenBSD 2019-10-30 15:05:53 -07:00
Jeff Barber
d698bddc7d Publish ftp_data_expected updates to other workers for synchronization 2019-10-30 15:50:22 -06:00
Jon Siwek
90771d4aba Merge remote-tracking branch 'origin/topic/johanna/configure-libdir'
* origin/topic/johanna/configure-libdir:
  Add --libdir convenience flag to configure.
2019-10-30 13:33:36 -07:00
Johanna Amann
1eb22bd53b Update submodule
[nomail]
2019-10-30 21:26:58 +01:00
Dominik Charousset
fadaa40e04 Add API documentation to IntrusivePtr 2019-10-30 21:02:06 +01:00
Dominik Charousset
054a4f4612 Rename make{ Counted => _intrusive } 2019-10-30 20:27:57 +01:00
Jon Siwek
62161dcc34 Remove "using namespace std" from header files 2019-10-30 12:26:10 -07:00
Dominik Charousset
21b6159e70 Remove braces around single return statements 2019-10-30 20:25:08 +01:00
Jon Siwek
13a431f9fb Merge branch 'master' of https://github.com/redsand/zeek
- Simplified this to just return result of inet_pton

* 'master' of https://github.com/redsand/zeek:
  adds missing ipv6 support for patricia trie index (white/blacklist) under *nix. only worked for nt before..
2019-10-30 11:03:59 -07:00
Johanna Amann
f98d4cb9e9 Add --libdir convenience flag to configure.
The flag sets the library installation directory.
2019-10-30 10:42:16 -07:00
Tim Shelton
338e15cc38 adds missing ipv6 support for patricia trie index (white/blacklist) under *nix. only worked for nt before.. 2019-10-30 16:00:18 +00:00
Robin Sommer
82f656ec9c Merge remote-tracking branch 'origin/topic/jsiwek/gh-664-tcp-syn-data-signatures'
* origin/topic/jsiwek/gh-664-tcp-syn-data-signatures:
  GH-664: fix signature matching for payload-carrying SYN packets
2019-10-30 08:07:47 +00:00
Jon Siwek
9c4e44924f GH-664: fix signature matching for payload-carrying SYN packets
Or more generally, signatures would not work correctly for any case
where the first TCP packet seen contained payload data, regardless of
its TCP flags.
2019-10-29 17:20:08 -07:00
Dominik Charousset
72e15fe4d4 Integrate review feedback 2019-10-29 21:24:56 +01:00
Jon Siwek
7b9a27c96a Merge remote-tracking branch 'origin/topic/johanna/remove-build-unique'
* origin/topic/johanna/remove-build-unique:
  Replace build_unique with make_unique
2019-10-29 09:42:55 -07:00
Dominik Charousset
0f41b063b2 Add and use new IntrusivePt type in Zeek
Manual memory management via Ref/Unref is verbose and prone to error. An
intrusive smart pointer automates the reference counting, makes code
more robust (in particular w.r.t. to exceptions) and reduces boilerplate
code. A big benefit of the intrusive smart pointers for Zeek is that
they can co-exist with the manual memory management. Rather than having
to port the entire code base at once, we can migrate components
one-by-one. In this first step, we add the new template
`IntrusivePtr<T>` and start using it in the Broker Manager. This makes
the previous `unref_guard` obsolete.
2019-10-29 16:49:27 +01:00
Johanna Amann
0ab72e5983 Update submodules
[nomail]
2019-10-29 12:21:27 +01:00
Johanna Amann
e2a8dd4db1 Replace build_unique with make_unique
This was a rarely used convenience function from when we did not yet
have c++17 support.
2019-10-29 11:50:30 +01:00
Johanna Amann
ff612876c5 Revert "Fix compilation on OS-X."
This reverts commit cde28074a1.

We now have a c++14 compiler.

Fixes GH-626
2019-10-29 11:42:45 +01:00
Jon Siwek
6f3a695b3f Updating submodule(s).
[nomail]
2019-10-28 22:24:16 -07:00
Jon Siwek
36d7628bcb Install cmake3 from EPEL on CentOS CI system 2019-10-28 20:18:45 -07:00
Jon Siwek
2613640abe Merge remote-tracking branch 'origin/topic/neverlord/cmake3'
* origin/topic/neverlord/cmake3:
  Fix position of project(), require CMake 3
2019-10-28 18:31:51 -07:00
Johanna Amann
44086c1f03 Merge remote-tracking branch 'origin/topic/jsiwek/gh-654-coerce-unspecified-table-defaults'
* origin/topic/jsiwek/gh-654-coerce-unspecified-table-defaults:
  GH-654: allow table() in function &default expressions
  GH-654: allow table() in record &default expressions

Fixes GH-654
2019-10-28 20:59:39 +01:00
Johanna Amann
8b789f7c31 Merge branch 'fix-typo' of https://github.com/keithjjones/zeek
* 'fix-typo' of https://github.com/keithjjones/zeek:
  Fix up some documentation.
2019-10-28 20:42:29 +01:00
Keith J. Jones
05788a2c02 Fix up some documentation. 2019-10-28 09:29:35 -04:00