Commit graph

15389 commits

Author SHA1 Message Date
Robin Sommer
c2ce401e2f
Fix re-instantiation of analyzers that were just removed.
When an analyzer is being removed from a connection's analyzer tree,
it's at first only marked as removed, but not yet actually deleted.
The problem was that until destruction happens, the analyzer methods
checking presence of an analyzer would continue to indicate that it's
there, even though semantically one wouldn't expect to find it anymore
after that removal operation. That in turn then prevented one from
adding a new analyzer of the same type during that time until
destruction (because we don't allow more than one of each kind at the
same time).

This fix changes the logic searching for analyzers to ignore any
existing ones scheduled for removal. I believe this shouldn't have any
further side effects.

Closes #2801.
2023-02-24 16:32:16 +01:00
Arne Welzel
0ddfe69bed tests/bifs-and-scripts-install: Remove unused activate.zeek 2023-02-24 16:14:05 +01:00
Arne Welzel
a7dc58f496 Update cmake submodule
To pull in zeek/cmake#62.
2023-02-24 12:29:56 +01:00
Arne Welzel
2b18a9396f cirrus: Also add ccache limits to container builds 2023-02-24 10:03:33 +01:00
Arne Welzel
edd3775c83 cirrus: Add an epoch to the ccache fingerprint, bump to 1000M
Merging this will flush the caches once by changing the fingerprint.
Also increase the limit to 1GB to strike a balance between fast
down/uploads and suboptimal ccache pruning:
2023-02-24 09:55:28 +01:00
Arne Welzel
1f9c2f6875 cirrus: Cap ccache max size to 500M and max files to 20000
After #2802, depending on the task/platform, a mostly cached build on Cirrus CI
is taking 30-60seconds. Eye balling a few tasks, it is now taking longer to
download and unpack as well as check and re-upload the accumulated cache in
the beginning and end of a task.

For Debian 11, this was ~1:20 and 1:10 with a cache size of ~4.2GB. The
default size limit for ccache is 5GB, there's no limit to the number of files.

Running a fresh build on Debian 11, ccache -s indicates the actual
required cache size is ~100MB and the number of files in cache is ~2.7k.
Lower cache size to 500M and number of files to 20000, such that we don't
unnecessarily accumulate the cache and spend resources on downloading,
checking and re-uploading the cache.

    root@cirrus-ci-task-4907974120964096# ccache -s | grep -E 'files|size'
    files in cache                      2736
    cache size                          96.7 MB
    max cache size                       5.0 GB

PRs have their own cache namespace, so they won't thrash the main's
branch cache. I think main and release share their branch, so we should
not be super aggressive. Though we're probably okay with cache misses on
release once in a while.
2023-02-24 09:48:18 +01:00
zeek-bot
73e5793c7e Update doc submodule [nomail] [skip ci] 2023-02-24 00:29:22 +00:00
Tim Wojtulewicz
3946f34565 Merge remote-tracking branch 'origin/topic/timw/2730-file-extract-binary-mode'
* origin/topic/timw/2730-file-extract-binary-mode:
  GH-2730: Use binary mode when opening files in Extract file analyzer
2023-02-23 08:27:49 -07:00
Tim Wojtulewicz
1766aa2808 GH-2730: Use binary mode when opening files in Extract file analyzer 2023-02-23 08:22:57 -07:00
Tim Wojtulewicz
4afc1303b4 Merge remote-tracking branch 'origin/topic/timw/2574-windows-build-warnings'
* origin/topic/timw/2574-windows-build-warnings:
  Include stdint.h early in flex files to prevent redefinition of int type macros
  Update bifcl submodule [nomail]
  Update binpac submodule [nomail]
  SMB: clarify a confusing line in one of the pac files
  module_util: Change streq helper method to just return bool
  NTLM analyzer: Don't bother checking boolean values for > 0
  FTP analyzer: Remove unnecessary lines from constructor
  IP_Hdr: take length value as uint64_t instead of int
  EventTrace: take size_t as a constructor argument instead of int
  Change argument to Tempvar constructor to size_t, avoids conversion warning in template construction
2023-02-23 07:40:42 -07:00
Arne Welzel
74bcfdda2e Merge remote-tracking branch 'origin/topic/awelzel/collect-repo-info-softer-git-dependency-take-2'
* origin/topic/awelzel/collect-repo-info-softer-git-dependency-take-2:
  ci/collect-repo-info: No hard dependency on git, take two
2023-02-23 15:19:11 +01:00
Arne Welzel
cc6e012f36 ci/collect-repo-info: No hard dependency on git, take two
Collecting information about builtin external plugins also
tried to use `git` unconditionally.
2023-02-23 14:21:36 +01:00
Arne Welzel
6bf1091a03 Merge remote-tracking branch 'origin/topic/awelzel/extend-news-about-repo-info-json'
* origin/topic/awelzel/extend-news-about-repo-info-json:
  NEWS: Add paragraph about repo-info.json to Breaking Changes
2023-02-23 12:16:41 +01:00
Tim Wojtulewicz
1a1cf8576e Merge remote-tracking branch 'origin/topic/timw/btest-dash-a'
* origin/topic/timw/btest-dash-a:
  Use btest -A on CI to get more information about stuck tests
2023-02-22 17:06:02 -07:00
Tim Wojtulewicz
473e309dd6 Use btest -A on CI to get more information about stuck tests 2023-02-22 16:57:06 -07:00
Tim Wojtulewicz
d83af286bb Include stdint.h early in flex files to prevent redefinition of int type macros 2023-02-22 16:39:54 -07:00
Tim Wojtulewicz
b459b6212f Update bifcl submodule [nomail] 2023-02-22 16:39:54 -07:00
Tim Wojtulewicz
84db1f7973 Update binpac submodule [nomail] 2023-02-22 16:39:54 -07:00
Tim Wojtulewicz
f92ca9e537 SMB: clarify a confusing line in one of the pac files 2023-02-22 16:39:54 -07:00
Tim Wojtulewicz
7ca4d36942 module_util: Change streq helper method to just return bool 2023-02-22 16:39:54 -07:00
Tim Wojtulewicz
184baf118d NTLM analyzer: Don't bother checking boolean values for > 0 2023-02-22 16:39:54 -07:00
Tim Wojtulewicz
d239f355fd FTP analyzer: Remove unnecessary lines from constructor 2023-02-22 16:39:54 -07:00
Tim Wojtulewicz
7e66261fd9 IP_Hdr: take length value as uint64_t instead of int 2023-02-22 16:39:54 -07:00
Tim Wojtulewicz
8e078299eb EventTrace: take size_t as a constructor argument instead of int 2023-02-22 16:39:54 -07:00
Tim Wojtulewicz
718cced7cd Change argument to Tempvar constructor to size_t, avoids conversion warning in template construction 2023-02-22 16:39:54 -07:00
Tim Wojtulewicz
6398329cd5 Merge remote-tracking branch 'origin/topic/timw/freebsd-ci-pip'
* origin/topic/timw/freebsd-ci-pip:
  Use ensurepip to install pip on FreeBSD
2023-02-22 15:53:17 -07:00
Tim Wojtulewicz
d4867d8ac0 Merge remote-tracking branch 'origin/topic/timw/update-benchmarker-host-name'
* origin/topic/timw/update-benchmarker-host-name:
  Update benchmarker Cirrus secrets to use org-level values
2023-02-22 14:26:35 -07:00
Tim Wojtulewicz
08ea09d69d Update benchmarker Cirrus secrets to use org-level values 2023-02-22 14:11:39 -07:00
Tim Wojtulewicz
5db8acdf36 Use ensurepip to install pip on FreeBSD
The py39-pip package is sometimes not available on FreeBSD, and using
ensurepip is the recommended way to install pip according to the pip
documentation. ensurepip should be available in every python
installation.
2023-02-22 13:27:20 -07:00
Arne Welzel
6ee5c6e9cc Merge branch 'topic/awelzel/collect-repo-info-softer-git-dependency'
* topic/awelzel/collect-repo-info-softer-git-dependency:
  ci/collect-repo-info: No hard dependency on git
2023-02-22 19:30:07 +01:00
Arne Welzel
352da9adc4 NEWS: Add paragraph about repo-info.json to Breaking Changes
This came up for OBS and following discussions in Slack indicate that
custom source tarballs might not be too uncommon.
2023-02-22 19:20:18 +01:00
Arne Welzel
f3253554d1 ci/collect-repo-info: No hard dependency on git
The OBS builds run in an environment where no git is installed and
release tarballs assembled manually.

Drop the hard-requirement on git from ci/collect-repo-info.json.
2023-02-22 18:12:32 +01:00
Arne Welzel
dfdcfd9647 Merge remote-tracking branch 'origin/topic/awelzel/2776-zeek-config-version-cache-busting'
* origin/topic/awelzel/2776-zeek-config-version-cache-busting:
  Bump zeek-af_packet-plugin
  zeek-config: Move ZEEK_VERSION* out of zeek-config.h
2023-02-22 16:49:49 +01:00
Arne Welzel
4d540a11a9 Bump zeek-af_packet-plugin 2023-02-22 16:49:16 +01:00
Arne Welzel
d23b1331e5 zeek-config: Move ZEEK_VERSION* out of zeek-config.h
When bumping the VERSION file, everything that includes the auto-generated
zeek/zeek-config.h needs to rebuild and ccache usage is voided due the file
changing. Split the mutable version information into a new zeek-version.h
file to avoid this.

Further, do not include zeek-version.h within Plugin.h and avoid the reference
to ZEEK_VERSION_FUNCTION unless we're building an external plugin.

Closes #2776.
2023-02-22 16:48:39 +01:00
Robin Sommer
ebc9563243
Merge remote-tracking branch 'origin/topic/robin/gh-123-symlink'
* origin/topic/robin/gh-123-symlink:
  Bump spicy-plugin.
2023-02-22 15:52:23 +01:00
Robin Sommer
0f55521a9d
Bump spicy-plugin. 2023-02-22 15:51:07 +01:00
Arne Welzel
a693924099 Merge remote-tracking branch 'origin/topic/awelzel/2572-event-handler-stats'
* origin/topic/awelzel/2572-event-handler-stats:
  Bump external baselines
  external/testing-setup: Less telemetry.log volume
  EventHandler: Use telemetry framework for EventHandler.call_count
2023-02-22 12:59:41 +01:00
Arne Welzel
bf693aaaa5 Bump external baselines 2023-02-22 12:27:35 +01:00
Arne Welzel
d9e5cc3078 external/testing-setup: Less telemetry.log volume
For traces spanning a long time period, don't produce immense
amounts of logs. Also filter down the event handler invocation
entries to connection related events in telemetry.log.
2023-02-22 12:10:10 +01:00
Arne Welzel
56a8b99965 EventHandler: Use telemetry framework for EventHandler.call_count
Put the IntCounter into a std::optional rather than initializing
it at EventHandler construction time as that will currently expose
a time series per event handler through the Prometheus API.
2023-02-22 12:10:10 +01:00
zeek-bot
a40025b82d Update doc submodule [nomail] [skip ci] 2023-02-22 00:49:41 +00:00
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