Commit graph

3562 commits

Author SHA1 Message Date
Johanna Amann
d1e7134156 Merge remote-tracking branch 'origin/master' into topic/johanna/tls12-decryption 2022-01-05 10:27:55 +00:00
Tim Wojtulewicz
5400d789fe Merge remote-tracking branch 'origin/topic/vern/local-scope-work'
* origin/topic/vern/local-scope-work:
  added notice of deprecation to NEWS
  test suite update
  deprecation warning on use of out-of-scope local
2022-01-03 13:56:27 -07:00
Tim Wojtulewicz
a75b46bd12 Merge remote-tracking branch 'origin/topic/robin/gh1822-bittorrent-re'
* origin/topic/robin/gh1822-bittorrent-re:
  Switch BitTorrent analyzer to Zeek's regex engine
  Adding test for BitTorrent tracker.
2022-01-03 13:55:18 -07:00
Vern Paxson
38c6c8f073 test suite update 2021-12-25 16:04:08 -08:00
Avinal Kumar
c2cff6dac7
Switch BitTorrent analyzer to Zeek's regex engine
- Removes dependency on <regex.h>
- Replaces regex function with Zeek's standard regex functions
- Some replacements are workaround, may be improved later via an
appropiate API
- Update test baseline to fix what seems to be capturing on a bug in the
existing code.

Edit pass by Robin Sommer. Note that our test doesn't cover all the code
paths, but it does go through the one with the most substantial change.
2021-12-22 08:24:27 +01:00
Christian Kreibich
a56ee6b9a6 Add separate utility module for controller and agent
We can figure out later whether & where to re-settle helper functions that end
up in there.
2021-12-21 14:52:28 -08:00
Robin Sommer
0507f6005c
Adding test for BitTorrent tracker.
Our test trace is extracted from https://www.cloudshark.org/captures/b9089aac6eee.

There actually seems to be a bug in the existing code: the URI passed to
bt_tracker_request() includes a partial HTTP version. This commits
includes the baseline as the current code produces it, we'll fix that in
a subsequent comment.
2021-12-21 17:48:26 +01:00
Vern Paxson
77f6a658e6 additional test suite updates for "-u" usage issues 2021-12-14 15:35:24 -08:00
Vern Paxson
dff664dc1f test suite updates for "xform" and "usage" alternatives, plus test name change 2021-12-14 12:50:17 -08:00
Vern Paxson
deb518588a fix typo in btest filename 2021-12-14 11:33:21 -08:00
Tim Wojtulewicz
7de9a7d76f GH-1860: Add double_to_int() bif 2021-12-13 10:46:14 -07:00
Vern Paxson
a0e7feda6f btests for new --optimize-funcs and --optimize-files 2021-12-10 13:02:52 -08:00
Vern Paxson
267f5461d8 update btest to no longer use (unsupported) %S formatting, no longer needed 2021-12-10 12:46:07 -08:00
Tim Wojtulewicz
c105cbad6e Merge remote-tracking branch 'origin/topic/vern/ZAM-maint'
* origin/topic/vern/ZAM-maint:
  updates to ZAM to track recent changes in script semantics
2021-12-10 13:11:20 -07:00
Tim Wojtulewicz
7a6a81c200 Merge remote-tracking branch 'origin/topic/timw/1740-table-key-error'
* origin/topic/timw/1740-table-key-error:
  GH-1741: Print error if calling a non-hook with hook keyword
  GH-1740: Report a better error message if table key is not a list
2021-12-10 09:28:34 -07:00
Tim Wojtulewicz
5f81c50e0f GH-1125: Support GRE ARUBA headers 2021-12-09 14:58:09 -07:00
Tim Wojtulewicz
248325e301 Fix ethertype for ARP in Geneve forwarding rules 2021-12-09 14:58:08 -07:00
Tim Wojtulewicz
b966a3876f GH-1741: Print error if calling a non-hook with hook keyword 2021-12-09 14:35:40 -07:00
Christian Kreibich
1aaed1cc2e Add LogAscii::json_include_unset_fields flag to control unset field rendering
The flag controls whether JSON rendering includes unset &optional log fields
(F, the default), or includes them with a null value (T).
2021-12-08 17:29:07 -08:00
Tim Wojtulewicz
c7eef7b094 Update plugin.hooks baseline for recent Geneve change 2021-12-07 10:43:46 -07:00
Christian Kreibich
78803b04fc Add testcases for plugin with doctest usage 2021-12-06 12:17:22 -08:00
Vern Paxson
3f9f47980a updates to ZAM to track recent changes in script semantics 2021-12-04 20:24:39 -05:00
Tim Wojtulewicz
e7412e257f Merge remote-tracking branch 'bbannier/topic/bbannier/more-autoformating'
* bbannier/topic/bbannier/more-autoformating:
  Format Python scripts with yapf.
  Format shell scripts with shfmt.
2021-12-01 10:33:22 -07:00
Vern Paxson
417f9ffe98 fix btest comment to more accurately describe the test 2021-11-29 13:17:57 -08:00
Vern Paxson
8f8c594220 btests for erroneous script conditionals 2021-11-24 15:19:44 -08:00
Benjamin Bannier
1f388e3f40 Format shell scripts with shfmt.
All changes in this patch were performed automatically with `shfmt` with
configuration flags specified in `.pre-commit-config.yaml`.

In addition to fixing whitespace the roundtrip through shfmt's AST also
transforms command substitutions

    `cmd`
    # becomes
    $(cmd)

and some redirects

    >&2 echo "msg"
    # becomes
    echo >&2 "msg"
2021-11-24 23:13:02 +01:00
Tim Wojtulewicz
8e1d770966 Merge remote-tracking branch 'origin/topic/vern/record-empty-vector-fix'
* origin/topic/vern/record-empty-vector-fix:
  fixes for constructing and assigning records with fields that are empty vectors
2021-11-24 13:32:45 -07:00
Vern Paxson
06bbd167cd fixes for constructing and assigning records with fields that are empty vectors 2021-11-24 11:16:33 -08:00
Tim Wojtulewicz
2044fbe53b Add GTPv1 packet analyzer, disable old analyzer 2021-11-23 19:36:50 -07:00
Tim Wojtulewicz
dc0ecf9811 Add Teredo packet analyzer, disable old analyzer 2021-11-23 19:36:50 -07:00
Tim Wojtulewicz
05574ecce1 Add VXLAN packet analyzer, disable old analyzer 2021-11-23 19:36:50 -07:00
Tim Wojtulewicz
cbb0bcd49c Add Geneve packet analyzer, disable old analyzer 2021-11-23 19:36:50 -07:00
Tim Wojtulewicz
7e40094f2c Add AYIYA packet analyzer, disable old analyzer 2021-11-23 19:36:50 -07:00
Tim Wojtulewicz
44e0760e96 Add PacketAnalyzer::register_for_port(s) functions
These allow packet analyzers to register ports as identifiers to forward from
parent analyzers, while also adding those ports to the now-global
Analyzer::ports table at the same time.
2021-11-23 19:36:50 -07:00
Tim Wojtulewicz
612212568a Add analyzer_confirmation and analyzer_violation events 2021-11-23 19:36:50 -07:00
Tim Wojtulewicz
a7d3cb48ef Add concept of "parent" tag namespaces
This allows us to create an EnumType that groups all of the analyzer
tag values into a single type, while still having the existing types
that split them up. We can then use this for certain events that benefit
from taking all of the tag types at once.
2021-11-23 19:36:49 -07:00
Tim Wojtulewicz
331161138a Unify all of the Tag types into one type
- Remove tag types for each component type (analyzer, etc)
- Add deprecated versions of the old types
- Remove unnecessary tag element from templates for TaggedComponent and ComponentManager
- Enable TaggedComponent to pass an EnumType when initializing Tag objects
- Update some tests that are affected by the tag enum values changing order
2021-11-23 19:36:49 -07:00
Johanna Amann
3fe6ad1a82 Merge remote-tracking branch 'origin/topic/johanna/gh-1829-test'
* origin/topic/johanna/gh-1829-test:
  Add testcase for TCP segment offloading.
2021-11-23 15:35:35 +00:00
Johanna Amann
d3f16af4ab Add testcase for TCP segment offloading.
Relates to GH-1829
2021-11-23 12:37:55 +00:00
Johanna Amann
12d81b27ed Merge remote-tracking branch 'origin/master' into topic/johanna/openssl-3-compat 2021-11-23 10:23:12 +00:00
Johanna Amann
48ee7db3c1 Merge remote-tracking branch 'origin/topic/johanna/gh-1829'
* origin/topic/johanna/gh-1829:
  Add documentation for GH-1829
  Packets with TSO: address review feedback.
  Accept packets that use tcp segment offloading.

Fixes GH-1829
2021-11-23 10:20:07 +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
Tim Wojtulewicz
6e8dae316b Added plugin.unprocessed_packet_hook btest 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
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
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
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