Commit graph

11634 commits

Author SHA1 Message Date
Jon Siwek
42b6040952 Fix redef'ing a table with a new &default attribute 2019-10-11 18:57:03 -07:00
Jon Siwek
a5771cd3d6 Use Ubuntu 14.04 for Travis CI environment 2019-10-08 20:58:54 -07:00
Jon Siwek
8773f93325 Updating submodule(s).
[nomail]
2019-10-08 19:36:29 -07:00
Johanna Amann
916205e254 Merge remote-tracking branch 'origin/topic/jsiwek/print-raw-bif'
* origin/topic/jsiwek/print-raw-bif:
  Add new BIF: print_raw()
2019-10-08 15:15:55 -07:00
Johanna Amann
cde28074a1 Fix compilation on OS-X.
OS X complains about std::pair not having a constexpr constructor. Which
seems to be the case for C++11. Hence, let's make it static const for
the moment.

This commit should be reverted when we move to C++17.
2019-10-07 18:52:11 -07:00
Dev Bali
cad6f881eb Proof of Concept on Bugprone Narrowing Conversions: Base64 2019-10-07 12:02:41 -07:00
Johanna Amann
e615d1f4a8 Merge remote-tracking branch 'origin/topic/jsiwek/gh-589-sub-microsecond-printing'
* origin/topic/jsiwek/gh-589-sub-microsecond-printing:
  GH-589: improve printing of sub-microsecond intervals
2019-10-07 10:51:40 -07:00
Johanna Amann
09f4053dbc Merge remote-tracking branch 'origin/topic/jsiwek/gh-591-set-enum-config'
* origin/topic/jsiwek/gh-591-set-enum-config:
  GH-591: allow Config::set_value() to use empty/unspecified table/sets
  GH-591: fix reading set[enum] values from input files
2019-10-07 10:46:45 -07:00
Jon Siwek
52f7647f25 Add supervisor stem process auto-revival 2019-10-04 13:25:01 -07:00
Jon Siwek
052feacbda GH-618: add "tcp_options" event containing TCP option values 2019-10-03 18:59:02 -07:00
Jon Siwek
222e3ad3ea Fix tcp_option event
It was not being raised in all the cases it should have been due to
an incorrect/unnecessary truncation check.
2019-10-03 17:55:07 -07:00
Jon Siwek
39b06e3cee GH-591: allow Config::set_value() to use empty/unspecified table/sets 2019-10-02 22:13:43 -07:00
Jon Siwek
fd66e7b9f6 GH-591: fix reading set[enum] values from input files 2019-10-02 22:09:16 -07:00
Jon Siwek
5622df4d1b Add new BIF: print_raw()
This is a convenience function to make it easier to print literal byte
sequences to stdout without additional escaping like what may be added
by the default `print` statement behavior.

For example, related to GH-596, `print` currently escapes even valid
UTF-8 byte sequences and makes it difficult to output valid JSON strings
containing such.
2019-10-02 15:21:24 -07:00
Jon Siwek
8ba19cd7d1 Merge remote-tracking branch 'origin/topic/neverlord/issue/612'
* origin/topic/neverlord/issue/612:
  Fix build with external CAF but bundled Broker
2019-10-02 11:04:47 -07:00
Jon Siwek
63c6265201 Updating submodule(s).
[nomail]
2019-10-01 18:46:06 -07:00
Jon Siwek
a5d71ed2d2 Merge remote-tracking branch 'origin/topic/timw/595-json-perf'
* origin/topic/timw/595-json-perf:
  Update COPYING.3rdparty
  Use json::emplace to avoid some extra calls to operator[]
  Use tessil/unordered-map instead of nlohmann/fifo-map to mitigate performance issues when logging JSON
2019-10-01 16:42:59 -07:00
Dominik Charousset
b618c7d0e2 Fix build with external CAF but bundled Broker 2019-10-01 21:08:14 +02:00
Jon Siwek
583458665d Updating submodule(s).
[nomail]
2019-10-01 12:03:48 -07:00
Robin Sommer
e263589140 Merge remote-tracking branch 'origin/topic/jsiwek/fix-to-json-record-leak'
* origin/topic/jsiwek/fix-to-json-record-leak:
  Improve RecordVal JSON formatting
  Fix memory leak in RecordVal JSON formatting
2019-10-01 09:06:30 +00:00
Johanna Amann
1b02aebe4e Merge remote-tracking branch 'origin/topic/jsiwek/paraglob-headers'
* origin/topic/jsiwek/paraglob-headers:
  GH-602: fix paraglob header inclusion, installation, and search paths
2019-09-30 21:10:12 -07:00
Jon Siwek
a34ade4876 Improve RecordVal JSON formatting
No need to create a record introspection table each time when all
the required information can be obtained directly in the RecordVal
and RecordType objects.  Besides the additional overhead, using such
a table will re-order the fields arbitrarily instead of using the
order in which they're defined.
2019-09-30 19:04:55 -07:00
Jon Siwek
d258ebe5ca Fix memory leak in RecordVal JSON formatting 2019-09-30 19:02:33 -07:00
Jon Siwek
97519e4350 Merge remote-tracking branch 'origin/topic/timw/606-json-nulls'
* origin/topic/timw/606-json-nulls:
  GH-606: Output nulls into json data if a field isn't set
2019-09-30 17:40:27 -07:00
Jon Siwek
3d4fef012a Merge remote-tracking branch 'origin/topic/timw/598-multikey-set-json'
Adjustments:
- Changed a push_back(...) into emplace_back(std:move(...))
- Removed superfluous table Lookup() since we already have the value
  while iterating

* origin/topic/timw/598-multikey-set-json:
  GH-598: handle multi-key sets correctly when outputting json
2019-09-30 17:34:11 -07:00
Jon Siwek
2465da0a9b Updating submodule(s).
[nomail]
2019-09-30 10:20:20 -07:00
Jon Siwek
4959d438fa Initial structure for supervisor-mode
The full process hierarchy isn't set up yet, but these changes
help prepare by doing two things:

- Add a -j option to enable supervisor-mode.  Currently, just a single
  "stem" process gets forked early on to be used as the basis for
  further forking into real cluster nodes.

- Separates the parsing of command-line options from their consumption.
  i.e. need to parse whether we're in -j supervisor-mode before
  modifying any global state since that would taint the "stem" process.
  The new intermediate structure containing the parsed options may
  also serve as a way to pass configuration info from "stem" to its
  descendent cluster node processes.
2019-09-27 19:17:58 -07:00
Jon Siwek
d97d625bc3 Updating submodule(s).
[nomail]
2019-09-27 17:34:16 -07:00
Tim Wojtulewicz
d4c394b72a GH-606: Output nulls into json data if a field isn't set 2019-09-27 14:12:48 -07:00
Tim Wojtulewicz
756f363185 GH-598: handle multi-key sets correctly when outputting json 2019-09-27 12:01:47 -07:00
Tim Wojtulewicz
a96ef56938 Update COPYING.3rdparty 2019-09-27 10:25:18 -07:00
Tim Wojtulewicz
d4d1009b5c Use json::emplace to avoid some extra calls to operator[] 2019-09-27 09:58:24 -07:00
Jon Siwek
95489d52d8 Updating submodule(s).
[nomail]
2019-09-27 08:32:57 -07:00
Jon Siwek
7613ab0af0 GH-602: fix paraglob header inclusion, installation, and search paths 2019-09-26 17:39:25 -07:00
Jon Siwek
bc18ca44e6 Fix Xcode deprecation warning for std::ptr_fun
Replaced logic in strstrip() with a lambda to avoid deprecations:

- std::ptr_fun is deprecated in C++11, removed C++17
- std::not1 is deprecated in C++17. removed C++20
2019-09-26 09:45:44 -07:00
Tim Wojtulewicz
c8f2d52d91 Use tessil/unordered-map instead of nlohmann/fifo-map to mitigate performance issues when logging JSON 2019-09-25 16:21:38 -07:00
Jon Siwek
1253a61340 Simplify reassembly code using DataBlockList::LastBlock() 2019-09-24 10:26:09 -07:00
Jon Siwek
5ce68bd20a Fix DataBlockList::DataSize()
Parameters got filled opposite to what they were supposed to be and
also didn't consider cutoffs that land in the middle of a block.
2019-09-24 10:21:20 -07:00
Robin Sommer
e30035910e Add missing commit to previous merge.
(This was a leftover from a merge conflict.)
2019-09-24 10:32:40 +00:00
Robin Sommer
c23764483d Merge remote-tracking branch 'origin/topic/jsiwek/reassembly-improvements-map'
* origin/topic/jsiwek/reassembly-improvements-map:
  Rename a reassembly DataBlockList function
  Add comments to reassembly classes
  Use DataBlock value instead of pointer in reassembly map
  Remove linked list from reassembly data structures
  Use an std::map for reassembly DataBlock searches
  Refactor Reassembler/DataBlock bookkeeping
  Reorganize reassembly data structures
  Remove a superfluous reassembler DataBlock member
2019-09-24 09:16:51 +00:00
Jon Siwek
f287d9abe8 GH-589: improve printing of sub-microsecond intervals 2019-09-23 19:57:49 -07:00
Jon Siwek
916491e2b4 Merge remote-tracking branch 'origin/topic/neverlord/scaffolding'
* origin/topic/neverlord/scaffolding:
  Fix second overly specific include_directories
  Add --build-dir as alias for --builddir
  Fix overly specific include_directories usage
2019-09-23 13:09:04 -07:00
Dominik Charousset
b56028fba0 Fix second overly specific include_directories 2019-09-21 12:17:06 +02:00
Dominik Charousset
e73bd60d04 Add --build-dir as alias for --builddir
This alias makes it easier for tooling that deals with both Zeek and
Broker (which uses `--build-dir`). Also, it's one less quirk to remember
when working with both repositories.
2019-09-21 11:49:18 +02:00
Dominik Charousset
68bb0e21a3 Fix overly specific include_directories usage
Calling `find_package(CAF)` puts all include directory paths into a
single variable. Picking the paths individually is not only error prone
and cumbersome, but can also lead to bulid errors. For example, when
using a build directory for CAF_ROOT then CAF_INCLUDE_DIRS will have one
extra path to find CAF's `config.hpp` (which is part of the build
directory).
2019-09-21 11:46:06 +02:00
Jon Siwek
bd6f89da05 Merge remote-tracking branch 'origin/topic/robin/cid-1402823'
- Fixed a reference counting issue

* origin/topic/robin/cid-1402823:
  Fix for CIDs 1402823 and 1394050.
2019-09-20 10:42:58 -07:00
Robin Sommer
c38e9b2ff2 Fix for CIDs 1402823 and 1394050.
An InterpreterException from clone framing could go uncaught.
2019-09-20 07:55:09 +00:00
Jon Siwek
0a2d84284c Update header include guard in zeek-config.h/bro-config.h 2019-09-19 16:41:04 -07:00
Jon Siwek
aeef4bf030 Merge branch 'topic/jgras/dpd-late-match' of https://github.com/J-Gras/zeek
* 'topic/jgras/dpd-late-match' of https://github.com/J-Gras/zeek:
  Improve dpd_late_match event generation.
  Improve logging of speculative service.
  Update test-all-policy script.
  Add speculative service script.
  Allow to handle late DPD matches.
2019-09-17 11:17:41 -07:00
Robin Sommer
6f9d1ec72d Merge remote-tracking branch 'origin/topic/jsiwek/gh-566-fix-ssh-encrypted-packet'
* origin/topic/jsiwek/gh-566-fix-ssh-encrypted-packet:
  GH-566: fix cases where ssh_encrypted_packet event wasn't raised
2019-09-17 17:22:27 +00:00