Commit graph

13262 commits

Author SHA1 Message Date
Christian Kreibich
ee28e3e8b1 Update doc and auxil/zeek-aux submodules [nomail] [skip ci] 2021-11-18 17:09:40 -08:00
Vern Paxson
ffbbacd3b1 switch looping over vectors to use iterators 2021-11-18 08:58:04 -08:00
Vern Paxson
6f82c1610e remove unused local variables 2021-11-18 08:57:03 -08:00
Vern Paxson
8e77e3e92c efficiency fix - return a reference rather than a copy of a map 2021-11-18 08:56:24 -08:00
Johanna Amann
0b517c01e0 Update cmake submodule for OpenSSL 3.0 changes 2021-11-18 07:44:01 +00:00
Christian Kreibich
67cbec9123 Update cmake and aux/zeek-aux submodules [nomail] [skip ci] 2021-11-17 16:42:04 -08:00
Christian Kreibich
c9229b68cf Merge branch 'topic/christian/fix-docker-doublebuild'
* topic/christian/fix-docker-doublebuild:
  Clean up fully after successful Docker btests
2021-11-17 11:58:13 -08:00
Johanna Amann
ff0bc86021 OpenSSL 3: normalize self-signed-cert error message
The message changed between OpenSSL 1.1 and 3.0 - we just use the old
one to not mess up the external test baselines.
2021-11-17 17:21:21 +00:00
Johanna Amann
0dc8dfacb7 Make cmake & ci like OpenSSL 3.0
Older cmake versions have problems with the version number. When
installing OpenSSL on a 64 bit linux one also needs to create an
additional symlink to get cmake to use the correct library.
2021-11-17 14:57:23 +00:00
Johanna Amann
ce38b5a056 Add OpenSSL 3.0 CI test 2021-11-17 13:33:49 +00:00
Johanna Amann
253d214126 OpenSSL 3: fix warnings and tests
This commit fixes the compile-time warnings that OpenSSL 3.0 raises for
our source-code. For the cases where this was necessary we now have two
implementations - one for OpenSSL 1.1 and earlier, and one for OpenSSL
3.0.

This also makes our testsuite pass with OpenSSL 3.0

Relates to GH-1379
2021-11-17 13:33:49 +00:00
Christian Kreibich
1dd6c1d716 Clean up fully after successful Docker btests
If we leave files sitting around, we trigger a Docker image double-build in CI,
because the build runs once, gets tested, and then gets run again when we push
the Docker image: the additional btest files cause Docker to detect a different
source tree, causing an image layer violation.

Also rename "cleanup" target to "clean", to align with rest of our tree.
2021-11-16 15:13:10 -08:00
Johanna Amann
6217851d6d Switch OpaqueVal hashing back to legacy OpenSSL implementation
This commit switches hashing from the more modern EVP message digest to
the older direct function calls, that are deprecated as of OpenSSL 3.0.

The reason is that we require the ability to store the internal state of
hash operations to disk. This is no longer possible with the
architecture that is used by the EVP digests; it is, however, possible
when using the legacy methods.

There might be a way to do this more cleanly in OpenSSL 3.1 - but for
the moment this seems like the easiest solution - even though I am not
really happy about it.

For details see zeek/zeek#1379 and openssl/openssl#14222
2021-11-16 15:33:31 +00:00
Johanna Amann
14f919895d Add documentation for GH-1829
This adds documentation that clarifies that the `ignore_checksums`
option now also allows IPv4 packets with a length of 0.
2021-11-16 13:51:29 +00:00
Christian Kreibich
bdb5222c27 Merge branch 'topic/christian/docker-tag-fix'
* topic/christian/docker-tag-fix:
  Fix ref-naming typo in the Github Docker workflow
2021-11-15 10:11:27 -08:00
Christian Kreibich
9675d866bb Fix ref-naming typo in the Github Docker workflow
When triggering upon a tag push, we now correctly compute the Docker image tag
based on the VERSION file.
2021-11-15 09:51:32 -08:00
zeek-bot
59d7d2896c Update doc submodule [nomail] [skip ci] 2021-11-13 00:42:02 +00:00
Tim Wojtulewicz
3cd9387eab Merge remote-tracking branch 'origin/topic/timw/1736-update-libkqueue'
* origin/topic/timw/1736-update-libkqueue:
  Update libkqueue submodule
2021-11-12 13:46:52 -07:00
Tim Wojtulewicz
362df3f1db Merge remote-tracking branch 'origin/topic/timw/1620-unprocessed-packets'
* origin/topic/timw/1620-unprocessed-packets:
  Added plugin.unprocessed_packet_hook btest
  Fix whitespace in help output
  Add command-line option to write unprocessed packets to a file
  GH-1620: Add event and plugin hook to track packets not processed
2021-11-12 09:31:10 -07:00
Tim Wojtulewicz
6e8dae316b Added plugin.unprocessed_packet_hook btest 2021-11-12 09:30:26 -07:00
Tim Wojtulewicz
d0f8c50417 Fix whitespace in help output 2021-11-12 09:30:26 -07:00
Tim Wojtulewicz
92b84a00f9 Add command-line option to write unprocessed packets to a file
This commit also changes the PcapDumper to automatically flush after
every called to Dump(). This is because pcap_dump has an internal buffer
of some sort that only writes to the file after a set amount of bytes.
When using the new option on a low-traffic network, it might be a while
before you see any packets written since it has to overcome that buffer
limit first.
2021-11-12 09:30:26 -07:00
Tim Wojtulewicz
fe932944c4 GH-1620: Add event and plugin hook to track packets not processed 2021-11-12 09:30:26 -07:00
Christian Kreibich
8fece3d8ea Update cmake submodule [nomail] [skip ci] 2021-11-11 14:35:43 -08:00
Tim Wojtulewicz
362566369f Update libkqueue submodule 2021-11-11 19:05:31 +00:00
zeek-bot
a6f18d514d Update doc submodule [nomail] [skip ci] 2021-11-11 00:43:13 +00:00
Tim Wojtulewicz
87d17cf56d Merge remote-tracking branch 'origin/topic/bbannier/install-3rdparty-headers'
* origin/topic/bbannier/install-3rdparty-headers:
  Install include headers from `src/3rdparty/`.
2021-11-10 10:20:13 -07:00
Johanna Amann
d451fb8184 Merge branch 'topic/AbdelSaTd/case-insensitive-find'
* topic/AbdelSaTd/case-insensitive-find:
  testing-do-find-str_case-insensitive
  case-insensitive-search-features-for-do_find_str

I did a few small style-fixes while merging this and expanded the test
a bit. I also removed unecessary commits.

Closes GH-1828
2021-11-10 11:33:47 +00:00
Abdel
effa8c403f testing-do-find-str_case-insensitive 2021-11-10 11:25:20 +00:00
Abdel
82b3606cdd case-insensitive-search-features-for-do_find_str 2021-11-10 11:25:20 +00:00
Robin Sommer
1bb21bfcb4 Merge remote-tracking branch 'origin/topic/robin/gh-1757-loadfile2'
* origin/topic/robin/gh-1757-loadfile2:
  Tweaking a couple of debug message.
  Add new hook `HookLoadFileExtended` that allows plugins to supply Zeek script code to parse.
  Move logic to execute `HookLoadFile` for signatures into rule matcher code.
2021-11-10 11:28:53 +01:00
Robin Sommer
64e34b52aa Tweaking a couple of debug message.
As suggested during review.
2021-11-10 09:39:16 +01:00
Benjamin Bannier
65bc817fcf Install include headers from src/3rdparty/.
This is a fixup commit for 72cbc7cd13
where we move some header files from `src/` to `src/3rdparty/` but
missed adding install rules for these header. Since some of these
headers are exposed in installed headers they need to be installed as
well.
2021-11-10 09:17:40 +01:00
Tim Wojtulewicz
0604df01e3 Merge remote-tracking branch 'origin/topic/bbannier/issue-1780'
* origin/topic/bbannier/issue-1780:
  Add Github action exercising pre-commit
  Add pre-commit config.
  Format code with `clang-format`
  Remove stale files `src/DebugCmdInfoConstants.*`
  Disable formatting for files in `testing/btest/plugins`
  Move 3rdparty source files to `3rdparty/`
2021-11-09 10:30:14 -07:00
Tim Wojtulewicz
8429ef746d Merge remote-tracking branch 'origin/topic/timw/1819-hashing-segfault'
* origin/topic/timw/1819-hashing-segfault:
  GH-1819: Handle recursive types when describing type in binary mode
2021-11-09 09:46:08 -07:00
Tim Wojtulewicz
9fdc70634f Merge remote-tracking branch 'origin/topic/timw/remove-false-teredo-test'
* origin/topic/timw/remove-false-teredo-test:
  Remove no-op false-teredo test
2021-11-09 09:28:43 -07:00
Johanna Amann
a011b4cb70 Packets with TSO: address review feedback.
This addresses review feedback of GH-1831 and additionally fixes one
case in which PayloadLen was used in a way that would have given
problematic results when TSO is enabled.
2021-11-09 15:11:27 +00:00
Benjamin Bannier
84e8000e62 Add Github action exercising pre-commit
This patch adds a Github action which exercises pre-commit linters for
commits to the `master` branch or for pull requests.  We adds this task
as a Github action since we expect it to finish quickly; running outside
of Cirrus makes it possible provide feedback quickly.
2021-11-09 07:20:18 +01:00
Benjamin Bannier
77e2e8278f Add pre-commit config.
This patch adds `clang-format` as only linter for now. This replaces the
previously used script from `auxil/run-clang-format` which we remove.

This requires the Python program `pre-commit`
(https://pypi.org/project/pre-commit/). With that one can then run
`clang-format` on the whole codebase with

    $ pre-commit run -a clang-format

or on just the staged files

    # Explicitly selecting linter.
    $ pre-commit run clang-format

    # Run all linters (currently just `clang-format`).
    $ pre-commit

`pre-commit` supports managing Git commit hooks so that linters are run
on commit. Linters can be installed with

    $ pre-commit install

The documentation at https://pre-commit.com/ covers these topics in
addition to more information.
2021-11-09 07:20:18 +01:00
Benjamin Bannier
4e16037acd Format code with clang-format
This patch formats files not conforming to the C++ formatting with
`clang-format`.
2021-11-09 07:20:18 +01:00
Benjamin Bannier
dafc9691c5 Remove stale files src/DebugCmdInfoConstants.*
The files generated from `src/DebugCmdInfoConstants.in` are placed in
`build/src/` by the build setup, and generated file in `src/` removed
here were unused and possibly out-of-date.
2021-11-09 07:20:18 +01:00
Benjamin Bannier
b23eb76043 Disable formatting for files in testing/btest/plugins
Files in that folder were previously not formatted. With this patch we
now disable formatting in that folder explicitly by adding a dedicated
`clang-format` config which deactivates any formatting changes.
2021-11-09 07:20:18 +01:00
Benjamin Bannier
72cbc7cd13 Move 3rdparty source files to 3rdparty/
This patch moves in-tree 3rdparty source files to `3rdparty/`. With that
we can remove special treatment of these files for `run-clang-format`.
2021-11-09 07:20:18 +01:00
Tim Wojtulewicz
e0b116154a GH-1819: Handle recursive types when describing type in binary mode 2021-11-08 15:19:57 -07:00
Christian Kreibich
c190c85bf0 Update doc submodule [nomail] [skip ci] 2021-11-08 09:08:20 -08:00
Vern Paxson
55b2ce7dbc Merge branch 'topic/vern/CPP-speedup' of github.com:zeek/zeek into topic/vern/CPP-speedup 2021-11-07 17:56:26 -08:00
Vern Paxson
3ea362be91 fix for case-sensitive file systems 2021-11-07 17:54:56 -08:00
Vern Paxson
0bdc268a00 geez sometimes it's signed sometimes it's not 2021-11-07 17:49:30 -08:00
Vern Paxson
ab1a29184c documentation updates 2021-11-07 17:05:21 -08:00
Vern Paxson
bb618bae30 remove -O add-C++ and -O update-C++ options 2021-11-07 17:02:18 -08:00