Commit graph

15389 commits

Author SHA1 Message Date
Benjamin Bannier
eb05122e74 Bump Spicy and spicy-plugin to latest releases.
(cherry picked from commit f27a9a6264)
2023-02-17 09:59:04 -07:00
Benjamin Bannier
328688cb18 Trim diffed output in test spicy.spicy-dump.
We previously would include any and all output from stderr during
compilation in the test baseline. Depending on the used compiler this
output may contain C++ compilation warnings which are uninteresting for
the behavior under test.

(cherry picked from commit 5221edf474)
2023-02-17 09:58:59 -07:00
Tim Wojtulewicz
c3aecb0c96 Update cmake and zeek-aux submodules [nomail] 2023-02-17 09:51:53 -07:00
Arne Welzel
0fd92555d9 Merge remote-tracking branch 'origin/topic/awelzel/propagate-on-change-through-copy'
* origin/topic/awelzel/propagate-on-change-through-copy:
  TableVal: Propagate &on_change attribute through copy()
  testing/btest: Add test showing &expire_func/&create_expire is copied
2023-02-17 17:38:37 +01:00
Arne Welzel
9f16520aa9 Merge remote-tracking branch 'origin/topic/awelzel/2793-propagate-order-through-copy'
* origin/topic/awelzel/2793-propagate-order-through-copy:
  TableVal: Propagate &ordered through copy()
2023-02-17 17:36:19 +01:00
Arne Welzel
e1d3e04239 Merge remote-tracking branch 'origin/topic/awelzel/2690-recursive-record-type-in-table'
* origin/topic/awelzel/2690-recursive-record-type-in-table:
  Type/is_supported_index_type: Deal with recursive record types
2023-02-17 17:35:52 +01:00
Arne Welzel
ec998dbfb6 Type/is_supported_index_type: Deal with recursive record types
This plugs the issue reported in #2690, there might be more though.

Closes #2690
2023-02-17 17:35:05 +01:00
Arne Welzel
754831d7b0 TableVal: Propagate &ordered through copy()
Copying an &ordered table or set would result in a copy that is not ordered.
This seems rather surprising behavior, so propagate the &ordered attribute.

Closes #2793
2023-02-17 16:28:50 +01:00
Arne Welzel
b2c4f8fd92 TableVal: Propagate &on_change attribute through copy()
Mostly for consistency with &default, &expire_func and other attributes
being propagated through a copy(). Seems this was just missed during
the implementation and/or was never tested for.
2023-02-17 16:21:32 +01:00
Arne Welzel
2b5db43270 testing/btest: Add test showing &expire_func/&create_expire is copied
Does not seem there is a test, but current implementation is that
&expire_func and &create_expire are propagated through copy().
2023-02-17 16:16:06 +01:00
Eldon Koyle
d17329c95b Update seemingly-unrelated btests
For some reason, the plugin order appears to have changed in the files btests.
2023-02-17 08:10:28 -07:00
Eldon Koyle
32afbae9db Use a default analyzer
Use a default analyzer instead of hardcoding a protocol number.
2023-02-16 19:39:27 -07:00
Tim Wojtulewicz
3de785114b Merge remote-tracking branch 'origin/topic/timw/2788-tcp-utility-functions'
* origin/topic/timw/2788-tcp-utility-functions:
  Move get_relative_seq and get_segment_len to public static methods
2023-02-16 15:10:48 -07:00
Tim Wojtulewicz
024d3a227a Move get_relative_seq and get_segment_len to public static methods 2023-02-16 10:45:11 -07:00
Eldon Koyle
56aa03031d Simplify PBB analyzer by using Ethernet analyzer
After the first 4 bytes, this traffic actually just looks like Ethernet.
Rather than try to re-implement the ethernet analyzer, just check the
length, skip 4 bytes, and pass it on.
2023-02-16 08:19:30 -07:00
Arne Welzel
f6872b588e Merge remote-tracking branch 'origin/topic/christian/btest-invocation-for-cluster-tests'
* origin/topic/christian/btest-invocation-for-cluster-tests:
  CI: remove no longer needed workaround for GITHUB_ACTION env var in cluster tests
  CI: directly invoke btest in the cluster testsuite
2023-02-16 10:32:10 +01:00
Christian Kreibich
2d024905a6 CI: remove no longer needed workaround for GITHUB_ACTION env var in cluster tests
This got fixed in the testsuite via zeek/zeek-testing-cluster#24.
2023-02-15 19:22:41 -08:00
Christian Kreibich
27788e720d CI: directly invoke btest in the cluster testsuite
This resembles the way we also invoke it in ci/test.sh, and "-d"'s direct
console output saves a roundtrip through uploaded artifacts when tests fail.
This skips test retries for now -- not sure we really need it for this
testsuite.
2023-02-15 15:49:23 -08:00
Eldon Koyle
1e73716172 Add btest for PBB and update baselines 2023-02-15 14:36:26 -07:00
Tim Wojtulewicz
5ec72a7698 Merge remote-tracking branch 'origin/topic/timw/fix-windows-build'
* origin/topic/timw/fix-windows-build:
  Fix linking of zeek_build_info on Windows
  CI: Enable Windows builds for PRs
  Call python explicitly from cmake for collecting repo info on Windows
  Rework zeek-inet-ntop snprintf return value handling
2023-02-15 11:12:36 -07:00
Arne Welzel
3fe67565a2 Merge remote-tracking branch 'origin/topic/awelzel/early-telemetry-mgr-initialization'
* origin/topic/awelzel/early-telemetry-mgr-initialization:
  zeek-setup: Ensure telemetry_mgr is created before other managers
2023-02-15 19:10:54 +01:00
Tim Wojtulewicz
395747c8c6 Fix linking of zeek_build_info on Windows 2023-02-15 10:47:43 -07:00
Tim Wojtulewicz
8a0cd76779 CI: Enable Windows builds for PRs 2023-02-15 10:47:43 -07:00
Tim Wojtulewicz
d34e4fb29b Call python explicitly from cmake for collecting repo info on Windows 2023-02-15 10:47:43 -07:00
Tim Wojtulewicz
9dd6ddf548 Rework zeek-inet-ntop snprintf return value handling 2023-02-15 10:47:43 -07:00
Arne Welzel
6ada6b0426 zeek-setup: Ensure telemetry_mgr is created before other managers
It's difficult to initialize metrics families in the constructor
of other Managers if the telemetry_mgr isn't around yet.
2023-02-15 18:06:17 +01:00
Arne Welzel
8e2d68ffec Merge remote-tracking branch 'origin/topic/vern/Feb23-C++-maint'
* origin/topic/vern/Feb23-C++-maint:
  added to C++ script compiler maintainer notes utility of starting with full base script compile
  fixes for order-of-initialization in scripts compiled to C++ annotations of such initializations to tie them to the original Zeek script
  Fixed bad memory access in compiled-to-C++ scripts when initializing attributes
2023-02-15 13:31:40 +01:00
Vern Paxson
2f347bf7d4 added to C++ script compiler maintainer notes utility of starting with full base script compile 2023-02-14 15:20:56 -08:00
Vern Paxson
3d0faa8cea fixes for order-of-initialization in scripts compiled to C++
annotations of such initializations to tie them to the original Zeek script
2023-02-14 15:19:49 -08:00
Vern Paxson
ce7e253dfd Fixed bad memory access in compiled-to-C++ scripts when initializing attributes 2023-02-14 15:18:10 -08:00
Christian Kreibich
863a25f5ef Bump external zeek-testing commit hash to bring it up to master 2023-02-14 13:19:24 -08:00
Tim Wojtulewicz
ac69c30eeb Merge remote-tracking branch 'origin/topic/awelzel/hash-skip-describe'
* origin/topic/awelzel/hash-skip-describe:
  HashKey: Do not call Describe() unconditionally in DEBUG mode
2023-02-14 07:39:12 -07:00
Tim Wojtulewicz
cea7fc4907 Merge remote-tracking branch 'origin/topic/timw/2720-vxlan-geneve-confirmation'
* origin/topic/timw/2720-vxlan-geneve-confirmation:
  Call AnalyzerConfirmation earlier in VXLAN/Geneve analysis
  Add validation of session to start of AYIYA/VXLAN/Geneve analysis
2023-02-14 07:36:05 -07:00
Tim Wojtulewicz
02b3202453 Call AnalyzerConfirmation earlier in VXLAN/Geneve analysis 2023-02-14 07:35:29 -07:00
Tim Wojtulewicz
16f6cafd9a Add validation of session to start of AYIYA/VXLAN/Geneve analysis
This mimics how the Teredo analyzer is already doing it, including
sending a weird if the session is invalid and bailing out if the
protocol was already violated.
2023-02-14 07:35:29 -07:00
Arne Welzel
de934b6af5 Merge remote-tracking branch 'origin/topic/awelzel/collect-repo-info-worktree'
* origin/topic/awelzel/collect-repo-info-worktree:
  ci/collect-repo-info.py: Recognize git worktrees, too
2023-02-14 11:00:19 +01:00
Arne Welzel
92e73606ba HashKey: Do not call Describe() unconditionally in DEBUG mode
An unnecessary overhead of the Hash() method was uncovered for DEBUG builds
due to computing a description of every HashKey() even when the DBG_HASHKEY
stream is not enabled. Squelch it.
2023-02-14 10:52:54 +01:00
Arne Welzel
b9218b2ec7 ci/collect-repo-info.py: Recognize git worktrees, too
Benjamin reported ci/collect-repo-info.py failing for him in
Git worktrees, use `git` to actually check if we're in a repo.
2023-02-14 10:06:09 +01:00
Eldon Koyle
beb19905c2 Use constexpr instead of #define 2023-02-13 09:34:42 -07:00
Arne Welzel
252cd33283 Merge remote-tracking branch 'origin/topic/awelzel/1405-include-build-info-in-executable'
* origin/topic/awelzel/1405-include-build-info-in-executable:
  docker: Add git to builder
  Add zeek -V/--build-info
2023-02-13 12:56:55 +01:00
Arne Welzel
e6f6b1343c docker: Add git to builder 2023-02-13 12:23:36 +01:00
Arne Welzel
3284259561 Add zeek -V/--build-info
This adds a new utility called ci/collect-repo-info.py to produce a JSON
document that is then baked into the Zeek executable file. Further, when
creating a tarball via `make dist`, put a top-level repo-info.json file
in place that is picked when no .git directory exists.

Closes #1405
2023-02-13 12:23:29 +01:00
Arne Welzel
2b33645f06 Merge remote-tracking branch 'origin/topic/awelzel/2765-cirrus-ci-container-images-follow-up'
* origin/topic/awelzel/2765-cirrus-ci-container-images-follow-up:
  docker/Makefile: Remove stray quotes, unused DOCKER
  cirrus/container: Polish, fix and automated pushing of images
2023-02-13 12:11:16 +01:00
Arne Welzel
2ceaf271f2 docker/Makefile: Remove stray quotes, unused DOCKER 2023-02-13 12:09:59 +01:00
Arne Welzel
357bdc71ad cirrus/container: Polish, fix and automated pushing of images
* Add ci/find-current-version.sh to figure out versions of lts and
  feature branch based on repository state.

* Do not use ZEEK_IMAGE_REPO for the local images that
  are expected to exist.

* Only use IMAGE_NAME/IMAGE_TAG instead of the ARCH and MANIFEST
  versions that contained the very same values

* Support and push additional tags

  In addition to the lts and feature tags, also push the base version
  tags. 5.0 or 5.1 such that someone pulling zeek/zeek:5.0 will get
  the most recent available 5.0 patch release.
2023-02-13 12:08:53 +01:00
Tim Wojtulewicz
b3fbfebd6a Merge remote-tracking branch 'origin/topic/vern/ZAM-Feb23-maint'
* origin/topic/vern/ZAM-Feb23-maint:
  better error reporting when ZAM code calls a function
  fix for ZAM compilation of "in" expressions
2023-02-11 22:07:45 -07:00
Tim Wojtulewicz
b79c34a321 Merge remote-tracking branch 'origin/topic/timw/3rdparty-sprintfs'
* origin/topic/timw/3rdparty-sprintfs:
  Update src/3rdparty submodule to get rid of some sprintf warnings
2023-02-11 21:39:56 -07:00
Eldon Koyle
269cc15888 Cleanup and add customer MAC addresses
* Put c-dst/c-src in l2_dst/l2_src
 * use #define instead of const int and move to PBB.h
2023-02-10 17:42:25 -07:00
Eldon Koyle
28d540483e Add PBB (802.1ah) support 2023-02-10 15:30:01 -07:00
Arne Welzel
6047846353 Merge remote-tracking branch 'origin/topic/timw/fix-cirrus-macos-builds'
* origin/topic/timw/fix-cirrus-macos-builds:
  CI: Call 'brew install' for macOS to ensure we're using openssl@3 on all hosts
2023-02-10 10:26:28 +01:00