Commit graph

14697 commits

Author SHA1 Message Date
Tim Wojtulewicz
18ee3a16ad Merge remote-tracking branch 'origin/topic/awelzel/2777-redef-error-messages'
* origin/topic/awelzel/2777-redef-error-messages:
  parse.y: Improve error reporting of type redef
2023-02-21 16:48:09 -07:00
Tim Wojtulewicz
233bd77009 Updating CHANGES and VERSION. 2023-02-21 12:28:23 -07:00
Arne Welzel
f56785740c ftp: Limit user, password, arg and reply_msg column sizes in log
The user and password fields are replicated to each of the ftp.log
entries. Using a very large username (100s of KBs) allows to bloat
the log without actually sending much traffic. Further, limit the
arg and reply_msg columns to large, but not unbounded values.
2023-02-21 12:28:07 -07:00
Tim Wojtulewicz
3c330122c6 Allow async DNS responses with zero TTLs to be considered valid after expriation
This fixes a potential memory leak when getting responses for asnyc DNS requests
where the TTL value on the response is zero. We were immediately considering the
request as expired and never removing it from the map of requests. This lead to
the DNS_Mgr eventually stopping processing of async requests.
2023-02-21 12:27:57 -07:00
Tim Wojtulewicz
8cf1e51623 Add max_size argument for find_all/find_all_ordered BIFs 2023-02-21 12:27:54 -07:00
Arne Welzel
2f4f01d3f5 parse.y: Improve error reporting of type redef
It's happening regularly to me that I forget the type specifier when redef'ing
records or enums and usually it takes me a while to figure out what's going
on as the errors are not descriptive. Improve the error reporting and just
bail as there's no sensible way to continue.

Closes #2777
2023-02-21 11:58:33 +01:00
zeek-bot
fc0bfd21d5 Update doc submodule [nomail] [skip ci] 2023-02-21 00:32:43 +00:00
Tim Wojtulewicz
c30b8f90ef Merge remote-tracking branch 'ekoyle/add-protocol-pbb'
* ekoyle/add-protocol-pbb:
  Update seemingly-unrelated btests
  Use a default analyzer
  Simplify PBB analyzer by using Ethernet analyzer
  Add btest for PBB and update baselines
  Use constexpr instead of #define
  Cleanup and add customer MAC addresses
  Add PBB (802.1ah) support
2023-02-19 19:24:15 -07:00
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