Commit graph

17347 commits

Author SHA1 Message Date
Arne Welzel
15ea8a3be9 logging/WriterBackend: Include logging/Types.h 2024-12-04 12:40:35 +01:00
Arne Welzel
ab1d48c95a logging/Manager: Implement new WriteBatchFromRemote() 2024-12-04 12:40:35 +01:00
Arne Welzel
3dd1f8d38a logging/WriterFrontend: Add LogWriteHeader as member
The header captures the enum values as well as the fields
2024-12-04 12:37:22 +01:00
Arne Welzel
f5d4526eac logging: Add filter_name to WriterInfo
...with this change, it'll be possible to identify WriterFrontend's
based on (stream, filter_name, path) pairs in addition to (stream,
writer, path) pairs.
2024-12-04 12:37:22 +01:00
Arne Welzel
2c52e533b2 Merge remote-tracking branch 'origin/topic/awelzel/spicy-type-convert-asan-options'
* origin/topic/awelzel/spicy-type-convert-asan-options:
  btest/spicy.type-converter: Drop ASAN_OPTIONS from test
2024-12-04 11:14:10 +01:00
Arne Welzel
a2cf0d874a btest/spicy.type-converter: Drop ASAN_OPTIONS from test
...doesn't seem it's needed anymore.

Fixes #4077
2024-12-04 11:11:47 +01:00
Arne Welzel
067c40a545 Merge remote-tracking branch 'origin/topic/neverlord/broker-cleanup'
* origin/topic/neverlord/broker-cleanup:
  Remove obsolete c_str_safe utility
  Remove obsolete Broker compatibility layer
2024-12-04 11:08:08 +01:00
zeek-bot
2ef57aaea1 Update doc submodule [nomail] [skip ci] 2024-12-04 00:23:36 +00:00
Tim Wojtulewicz
deb2acaeda Merge remote-tracking branch 'origin/topic/timw/json-interval-conversion'
* origin/topic/timw/json-interval-conversion:
  Add interval_as_double argument to control how intervals are converted to JSON
  Add btest for round-trip JSON conversion
  Allow comparing two PatternVals
  Handle conversion between data from Val::ToJSON and ValFromJSON better
2024-12-03 10:10:37 -07:00
Dominik Charousset
feeb06f7cf Remove obsolete c_str_safe utility
The old `c_str_safe` utility function allowed Zeek to operator on
`broker::data` and `broker::variant`. The former grants access to actual
`std::string` objects while the latter only provides access to fields
via `std::string_view`. Since the Zeek formatting functions need null
terminated strings, we need to copy the characters into a
null-terminated container first.

After removing support for `broker::data` and `broker::variant` from the
same code paths, we can drop `c_str_safe` and always do the copying
(since we are always dealing with `broker::variant` now).
2024-12-03 17:26:23 +01:00
Tim Wojtulewicz
43e3de5c79 Add interval_as_double argument to control how intervals are converted to JSON 2024-12-03 09:26:08 -07:00
Tim Wojtulewicz
8ff10e4d21 Add btest for round-trip JSON conversion 2024-12-03 09:26:08 -07:00
Tim Wojtulewicz
7670a6f589 Allow comparing two PatternVals 2024-12-03 09:26:08 -07:00
Tim Wojtulewicz
9f5cd54e78 Handle conversion between data from Val::ToJSON and ValFromJSON better 2024-12-03 09:26:08 -07:00
Dominik Charousset
470f545b37 Remove obsolete Broker compatibility layer
Since the transition to broker::variant has been long finalized, there
is no more need to be able to go back to a pre-variant version of
Broker. Hence, we can drop various utilities that allow Zeek to run with
older Broker releases.
2024-12-03 17:21:19 +01:00
Arne Welzel
d2ecdc2a11 Merge remote-tracking branch 'origin/topic/vern/ZAM-cluster-bifs'
* origin/topic/vern/ZAM-cluster-bifs:
  added new Cluster:: BiFs to script optimization tracking
2024-12-02 13:43:36 +01:00
Arne Welzel
731dd4cabe Merge remote-tracking branch 'origin/topic/vern/location-for-ZAM-vector-mismatch2'
* origin/topic/vern/location-for-ZAM-vector-mismatch2:
  added locations to ZAM run-time errors about vector size mismatches
2024-12-02 13:43:15 +01:00
Arne Welzel
423c2de4c8 Merge remote-tracking branch 'origin/topic/vern/dump-no-opt-ZAM'
* origin/topic/vern/dump-no-opt-ZAM:
  fixed -O dump-final-ZAM to work in conjunction with -O no-ZAM-opt
2024-12-02 10:59:16 +01:00
Benjamin Bannier
f1bb009e44 Merge branch 'topic/bbannier/bump-spicy' 2024-12-02 10:35:34 +01:00
Vern Paxson
2a9c1d900f added new Cluster:: BiFs to script optimization tracking 2024-11-30 08:36:39 -08:00
Vern Paxson
67f256e87a added locations to ZAM run-time errors about vector size mismatches 2024-11-29 08:13:12 -08:00
Vern Paxson
5feadf5d69 fixed -O dump-final-ZAM to work in conjunction with -O no-ZAM-opt 2024-11-28 16:36:28 -08:00
Benjamin Bannier
730316fc8a Remove support for building against Spicy versions before 1.8
zeek-6.0 shipped with spicy-1.8, but we still have dedicated handling
for earlier versions of Spicy in the code. This patch cleans them up
since these versions are unsupported.
2024-11-28 15:26:15 +01:00
Benjamin Bannier
0c55fb4dd7 Bump auxil/spicy to latest development snapshot 2024-11-28 15:26:15 +01:00
zeek-bot
a2a47ba334 Update doc submodule [nomail] [skip ci] 2024-11-28 00:11:24 +00:00
Tim Wojtulewicz
8d625715ca Merge remote-tracking branch 'origin/topic/johanna/jq-guard'
* origin/topic/johanna/jq-guard:
  Add TEST-REQUIRES: which jq to two new tests that are using jq
2024-11-27 12:31:59 -07:00
Johanna Amann
079581aa6b Add TEST-REQUIRES: which jq to two new tests that are using jq 2024-11-27 16:52:15 +00:00
Johanna Amann
e52bad6192 Merge remote-tracking branch 'origin/topic/johanna/modbus-test-comment'
* origin/topic/johanna/modbus-test-comment:
  Explain why modbus test does not work with the Spicy SSL analyzer
2024-11-27 15:52:51 +00:00
Johanna Amann
3523d393bf Explain why modbus test does not work with the Spicy SSL analyzer
This took a _long_ time to figure out.
2024-11-27 14:51:26 +00:00
Johanna Amann
7b582bc345 Merge remote-tracking branch 'origin/topic/johanna/sqlite-pragmas'
* origin/topic/johanna/sqlite-pragmas:
  Options for SQLite log writer, eliminate duplicate definitions
  Test synchronous/journal mode options for SQLite log writer
  Added default options for synchronous and journal mode
  Support for synchronous and journal_mode
2024-11-27 08:32:08 +00:00
zeek-bot
9e62c31421 Update doc submodule [nomail] [skip ci] 2024-11-27 00:23:50 +00:00
Arne Welzel
3ce41f1eff Merge remote-tracking branch 'origin/topic/awelzel/pluggable-cluster-backends-part2'
* origin/topic/awelzel/pluggable-cluster-backends-part2:
  ci/test.sh: Run doctest with TZ=UTC
  cluster/setup-connections: Switch to Cluster::subscribe(), short-circuit broker
  cluster/serializer: Add Broker based event serializers
  cluster: Add Cluster scoped bifs
  Reporter: Add ScriptLocationScope helper
  init-bare/zeek-setup: Add Cluster::backend const &redef
  broker: Implement cluster::Backend interface
  Broker: Fix some error messages
  broker: Remove MakeEvent(ArgsSpan)
2024-11-26 18:01:28 +01:00
Johanna Amann
35ad35ad0f Options for SQLite log writer, eliminate duplicate definitions
Patch provided by Arne Welzel, see GH-4063
2024-11-26 16:31:13 +00:00
Johanna Amann
35acbbfd03 Update 3dparty submodule
[nomail]
2024-11-26 16:28:54 +00:00
Arne Welzel
c3b30b187e Merge remote-tracking branch 'origin/topic/vern/zam-exception-leaks'
* origin/topic/vern/zam-exception-leaks:
  More robust memory management for ZAM execution - fixes #4052
2024-11-26 17:17:10 +01:00
Vern Paxson
847fcc66d6 More robust memory management for ZAM execution - fixes #4052 2024-11-26 17:05:38 +01:00
Johanna Amann
dec9eeafbd Merge remote-tracking branch 'origin/topic/johanna/sqlite3.47.1'
* origin/topic/johanna/sqlite3.47.1:
  Update SQLite to 3.47.1
2024-11-26 14:57:07 +00:00
Arne Welzel
f65c4f0b7e Merge remote-tracking branch 'origin/topic/awelzel/deprecate-val-list-to-args'
* origin/topic/awelzel/deprecate-val-list-to-args:
  ZeekArgs: Deprecate val_list_to_args()
2024-11-26 15:25:25 +01:00
Johanna Amann
d592942ccb Test synchronous/journal mode options for SQLite log writer
Also adds some small tweaks and adds the new feature to NEWS.
2024-11-26 12:26:38 +00:00
Arne Welzel
3de52c27e0 ci/test.sh: Run doctest with TZ=UTC
Broker's JSON serialization is TZ dependent (which seems a bug). For now
do the same as we do in btest.cfg and run doctests with TZ set to UTC.

Reported in zeek/broker#434.
2024-11-26 12:58:23 +01:00
Arne Welzel
fc12be1f17 cluster/setup-connections: Switch to Cluster::subscribe(), short-circuit broker
For the time being, this is easiest, otherwise we'd need to
conditionally load a broker-specific policy script based on
Cluster::backend being set.
2024-11-26 12:58:23 +01:00
Arne Welzel
9ec872d161 cluster/serializer: Add Broker based event serializers
This adds the first event serializers that use
broker functionality. Binary and JSON formats.
2024-11-26 12:58:23 +01:00
Arne Welzel
ef04a199c8 cluster: Add Cluster scoped bifs
... and a broker based test using Cluster::publish() and
Cluster::subscribe().
2024-11-26 12:58:23 +01:00
Arne Welzel
27e6d87331 Reporter: Add ScriptLocationScope helper 2024-11-26 12:13:14 +01:00
Arne Welzel
c7c96610e3 init-bare/zeek-setup: Add Cluster::backend const &redef 2024-11-26 12:13:14 +01:00
Arne Welzel
68a391d767 broker: Implement cluster::Backend interface 2024-11-26 12:13:14 +01:00
Arne Welzel
91a8fd0c63 Broker: Fix some error messages 2024-11-26 12:12:48 +01:00
Arne Welzel
a233b50be1 broker: Remove MakeEvent(ArgsSpan)
This was added previously in the 7.1 cycle. Now that MakeEvent() was
removed from cluster::Backend, there's no need for Broker to provide
this version.
2024-11-26 12:12:48 +01:00
Mymaqn
3ca56f7e0f Added default options for synchronous and journal mode
Added enum options SQLITE_SYNCHRONOUS_DEFAULT and SQLITE_JOURNAL_MODE_DEFAULT
and changed the default to be these instead.
2024-11-26 11:08:30 +00:00
Mymaqn
6e026ba313 Support for synchronous and journal_mode 2024-11-26 11:08:18 +00:00