Commit graph

17771 commits

Author SHA1 Message Date
Christian Kreibich
c2a7da0044 Update zeekctl submodule to pull in testsuite fix for metrics port 2025-03-04 12:53:17 -08:00
Tim Wojtulewicz
8f0236448b Merge remote-tracking branch 'origin/topic/timw/reformat-cpp-code-in-bison-and-flex-files'
* origin/topic/timw/reformat-cpp-code-in-bison-and-flex-files:
  Reformat embedded C++ code in bison/flex files
2025-03-04 09:34:06 -07:00
Tim Wojtulewicz
61cd5779f2 Reformat embedded C++ code in bison/flex files 2025-03-04 09:33:30 -07:00
Tim Wojtulewicz
a2a30f2a2b Merge remote-tracking branch 'origin/topic/timw/iptunnel-coverity-findings'
* origin/topic/timw/iptunnel-coverity-findings:
  Fix Coverity findings from recent IPTunnel dumping changes
2025-03-04 08:53:04 -07:00
Johanna Amann
dfa011a3ee Merge remote-tracking branch 'origin/topic/johanna/gh-4237'
* origin/topic/johanna/gh-4237:
  RDP: cookie is optional
2025-03-04 13:41:18 +00:00
Johanna Amann
72ea7fc06c RDP: cookie is optional
Fixes GH-4237
2025-03-04 13:38:01 +00:00
Arne Welzel
5cb25fd2e8 testing/external: Fix commit-hash.zeek-testing-private
update-changes mishap :-(
2025-03-04 14:36:02 +01:00
Arne Welzel
548a12813a Merge branch 'master' of https://github.com/markoverholser/zeek
* 'master' of https://github.com/markoverholser/zeek:
  Update zeek.bif documentation for to_count and to_int
2025-03-04 12:07:22 +01:00
Arne Welzel
3bec357ace Merge remote-tracking branch 'origin/topic/timw/bifs-tocount-zam-baseline'
* origin/topic/timw/bifs-tocount-zam-baseline:
  CI: Add release-build ZAM task for baseline checks during PRs
  Fix language/assert btest baselines for to_count/to_int changes
  Update the bifs.to_count baseline for ZAM
2025-03-04 12:06:24 +01:00
Arne Welzel
a3a08fa0f3 Merge remote-tracking branch 'origin/topic/awelzel/2311-load-plugin-bare-mode'
* origin/topic/awelzel/2311-load-plugin-bare-mode:
  scan.l: Fix @load-plugin scripts loading
  scan.l: Extract switch_to() from load_files()
  ScannedFile: Allow skipping canonicalization
2025-03-04 09:43:53 +01:00
Arne Welzel
ab99f8e233 scan.l: Fix @load-plugin scripts loading
For a plugin loaded via @load-plugin, create a YY_BUFFER_STATE holding
the required loads for the implicitly loaded files. In loaded scripts,
this generated file will show up with a path of the shared object file
of the plugin with the __preload__.zeek and __load__.zeek files loaded
by it.

Closes #2311
2025-03-04 09:35:00 +01:00
Benjamin Bannier
60bd08ca1a Merge remote-tracking branch 'origin/topic/bbannier/bump-pre-commit-hooks' [skip CI] 2025-03-04 09:13:11 +01:00
Benjamin Bannier
5d44073b94 Bump pre-commit hooks 2025-03-04 08:14:26 +01:00
Tim Wojtulewicz
19d22ad53b Fix Coverity findings from recent IPTunnel dumping changes 2025-03-03 19:14:29 -07:00
Tim Wojtulewicz
a86a9e2cc0 CI: Add release-build ZAM task for baseline checks during PRs 2025-03-03 15:51:29 -07:00
Tim Wojtulewicz
daaf3142bf Merge remote-tracking branch 'origin/topic/bbannier/cmake-format-zeek-add-analyzer'
* origin/topic/bbannier/cmake-format-zeek-add-analyzer:
  Always break lines when formatting `spicy_add_analyzer`
  Fix formatting of `zeek_add_plugin`
2025-03-03 10:47:14 -07:00
Benjamin Bannier
e768cee88c Always break lines when formatting spicy_add_analyzer 2025-03-03 11:24:20 +01:00
Benjamin Bannier
7c456538b4 Fix formatting of zeek_add_plugin 2025-03-03 11:23:09 +01:00
Tim Wojtulewicz
6de81160b6 Fix language/assert btest baselines for to_count/to_int changes 2025-02-28 20:21:57 -07:00
Tim Wojtulewicz
eb015801bd Update the bifs.to_count baseline for ZAM 2025-02-28 20:21:57 -07:00
zeek-bot
d3d7c54686 Update doc submodule [nomail] [skip ci] 2025-03-01 00:13:44 +00:00
Arne Welzel
d079a2b9a8 scan.l: Extract switch_to() from load_files() 2025-02-28 17:56:17 +01:00
Arne Welzel
2a8040039a ScannedFile: Allow skipping canonicalization 2025-02-28 17:55:36 +01:00
zeek-bot
31b5f763cf Update doc submodule [nomail] [skip ci] 2025-02-27 00:13:27 +00:00
zeek-bot
2e4da3223a Update doc submodule [nomail] [skip ci] 2025-02-26 00:13:08 +00:00
Mark Overholser
3acbb55513 Update zeek.bif documentation for to_count and to_int 2025-02-25 15:18:12 -06:00
Tim Wojtulewicz
3c16b0720a Merge remote-tracking branch 'origin/topic/timw/few-btest-jobs-for-zam-ci-tasks'
* origin/topic/timw/few-btest-jobs-for-zam-ci-tasks:
  CI: Use the right variable for the number of test jobs for zeekctl_debian11_task tasks
  CI: Use fewer btest jobs for ZAM tasks
2025-02-25 07:30:00 -07:00
zeek-bot
6f2e91aec3 Update doc submodule [nomail] [skip ci] 2025-02-25 00:13:44 +00:00
Tim Wojtulewicz
66e3232dcc Merge remote-tracking branch 'markoverholser/master'
* markoverholser/master:
  Fix incorrect syntax for static_cast in to_count that I introduced in a previous merge
  Update baselines after changes to to_count and to_int
  fix to_count in zeek.bif to resolve conflict from bbanier's adjustment to static casting of the return from strtoull
  Fix tests in to_count to reflect appropriate function; add tests for 0x-formatted hex values for to_count and to_int
  update BIFs to_int() and to_count() to accept optional 'base' argument; allows more more exotic conversions from hex, octal, binary
  Fixes #4076; update BIFs to_int() and to_count() to accept optional 'base' argument for more easy conversions of strings representing (for example) hexadecimal, octal, or binary numbers
2025-02-24 11:38:11 -07:00
Tim Wojtulewicz
3dd1d37f9d CI: Use the right variable for the number of test jobs for zeekctl_debian11_task tasks 2025-02-24 11:18:13 -07:00
Tim Wojtulewicz
b5b0c5c996 CI: Use fewer btest jobs for ZAM tasks
The ZAM tasks are being killed due to OOM issues on Cirrus while
running btests. Use fewer jobs try to avoid that.
2025-02-24 11:17:10 -07:00
Mark Overholser
165e753439 Fix incorrect syntax for static_cast in to_count that I introduced in a previous merge 2025-02-24 11:02:13 -06:00
Arne Welzel
58babca824 geneve/functions.bif: Fix :zeek:see directive, take two 2025-02-24 15:06:58 +01:00
Arne Welzel
8da219c61a geneve/functions.bif: Fix :zeek:see directive 2025-02-24 15:05:06 +01:00
Mark Overholser
362f083351 Update baselines after changes to to_count and to_int 2025-02-23 16:34:20 -06:00
Mark Overholser
eeaeaaeb16 fix to_count in zeek.bif to resolve conflict from bbanier's adjustment to static casting of the return from strtoull 2025-02-23 16:23:31 -06:00
Mark Overholser
8fce9c34f8 Fix tests in to_count to reflect appropriate function; add tests for 0x-formatted hex values for to_count and to_int 2025-02-23 16:19:12 -06:00
zeek-bot
6671e95c6b Update doc submodule [nomail] [skip ci] 2025-02-23 00:16:34 +00:00
Arne Welzel
3682a42376 Merge remote-tracking branch 'origin/topic/awelzel/get-geneve-options'
* origin/topic/awelzel/get-geneve-options:
  PacketAnalyzer::Geneve: Add get_options()
  packet_analysis: Track data spans of packet analyzers
2025-02-22 12:33:46 -08:00
Arne Welzel
776c003033 PacketAnalyzer::Geneve: Add get_options()
Allow to extract Geneve options on-demand, for example during a
new_connection() event.
2025-02-22 12:19:42 -08:00
Arne Welzel
2dc98acd1f packet_analysis: Track data spans of packet analyzers
Do not just track the analyzer instance in the stack, but also the
data span it is given. This allows to extract more information on-demand
during event processing.

TrackAnalyzer() is technically a public API, but no one should use it
outside of the Analyzer's Forward methods itself.
2025-02-22 12:19:42 -08:00
Benjamin Bannier
0bc0104eb2 Merge remote-tracking branch 'origin/topic/timw/to-int-zam' 2025-02-21 12:24:43 +01:00
Tim Wojtulewicz
caeae0b777 Fix bifs.to_count and bifs.to_int btests under ZAM 2025-02-20 17:24:50 -07:00
Tim Wojtulewicz
bcecc6ea51 Merge remote-tracking branch 'mnhsrj/innerPktResults'
* mnhsrj/innerPktResults:
  Set original/outer packet flags to reflect inner packet results
2025-02-20 16:41:05 -07:00
Tim Wojtulewicz
07a03bbfe9 Merge remote-tracking branch 'origin/topic/bbannier/integer-conversion-error-handling'
* origin/topic/bbannier/integer-conversion-error-handling:
  Also trim trailing spaces in `to_count`/`to_int` inputs
  Align error handling in `to_int` with existing behavior of `to_count`
  Baseline handling of leading/trailing spaces in `to_count`/`to_int`.
  Add error messages to `to_count`/`to_int` baselines
2025-02-20 15:35:34 -07:00
Tim Wojtulewicz
27bfd5b4a8 Merge remote-tracking branch 'origin/topic/timw/update-broker'
* origin/topic/timw/update-broker:
  Update broker submodule [nomail]
2025-02-18 09:46:43 -07:00
Tim Wojtulewicz
6609269f3c Merge remote-tracking branch 'origin/topic/awelzel/freebsd-14-1-to-14-2'
* origin/topic/awelzel/freebsd-14-1-to-14-2:
  cirrus: Bump FreeBSD 14 task to 14.2
2025-02-18 08:51:40 -07:00
Benjamin Bannier
d421a19691 Also trim trailing spaces in to_count/to_int inputs
Previously we would already trim leading spaces in inputs to `to_count`
and `to_int`, effectively by just passing the behavior of the low-level
functions used in their implementations to the user. While this was
useful it was also inconsistent in that we did not allow trailing
spaces which we enable with this patch.
2025-02-18 14:15:32 +01:00
Benjamin Bannier
55533e12d4 Align error handling in to_int with existing behavior of to_count
Previously `to_int` would silently ignore invalid inputs and simply
return `0` while `to_count` would return an error; this patch changes
`to_int` to behave like `to_count`.

This introduces a breaking change in that `to_int` now raises an error
for trailing spaces (but still accepts leading spaces) where it
previously would have silently accepted it. This is consistent with
the behavior of `to_count`, but one could also argue that both of
these should only accept properly trimmed input; I did not go that route
since that would introduce breaking changes for both these functions
instead of for just one of them.
2025-02-18 14:03:09 +01:00
Benjamin Bannier
742f17fb15 Baseline handling of leading/trailing spaces in to_count/to_int.
Currently `to_count` reports an error for trailing spaces (but not for
leading ones) while `to_int` silently accepts them. This patch adds
baselines capture the current behavior.
2025-02-18 14:01:53 +01:00