Commit graph

3757 commits

Author SHA1 Message Date
Tim Wojtulewicz
0793a38cc5 Merge remote-tracking branch 'origin/topic/vern/vec-slice-bug'
* origin/topic/vern/vec-slice-bug:
  btest to catch vector slice assignment issues
  bug fix for vector slice assignment
2022-01-25 13:52:19 -07:00
Vern Paxson
c378017269 btest to catch vector slice assignment issues 2022-01-25 10:47:33 -08:00
Johanna Amann
becc966106 Merge remote-tracking branch 'origin/topic/vern/vec-del-bug'
* origin/topic/vern/vec-del-bug:
  new btest to catch regressions to previous behavior/crash
  fix for adding a non-managed type to an empty vector
2022-01-17 10:35:51 +00:00
Vern Paxson
d6a68ada22 new btest to catch regressions to previous behavior/crash 2022-01-14 14:10:15 -08:00
Tim Wojtulewicz
3d9d6e953b Merge remote-tracking branch 'origin/topic/vern/when-lambda'
* origin/topic/vern/when-lambda:
  explicitly provide the frame for evaluating a "when" timeout expression
  attempt to make "when" btest deterministic
  tests for new "when" semantics/errors
  update existing test suite usage of "when" statements to include captures
  update uses of "when" in base scripts to include captures
  captures for "when" statements update Triggers to IntrusivePtr's and simpler AST traversal introduce IDSet type, migrate associated "ID*" types to "const ID*"
  logic (other than in profiling) for assignments that yield separate values
  option for internal use to mark a function type as allowing non-expression returns
  removed some now-obsolete profiling functionality
  minor commenting clarifications
2022-01-14 14:41:42 -07:00
Robin Sommer
964293209b
Merge remote-tracking branch 'origin/topic/robin/gh1844-host'
* origin/topic/robin/gh1844-host:
  Fix host header normalization in intel framework.
  Switch to recording unmodified HTTP header.
2022-01-10 14:43:30 +01:00
Vern Paxson
fa848167bb attempt to make "when" btest deterministic 2022-01-07 21:52:11 -08:00
Vern Paxson
c5ab916710 tests for new "when" semantics/errors 2022-01-07 14:54:47 -08:00
Vern Paxson
b59ee83979 update existing test suite usage of "when" statements to include captures 2022-01-07 14:54:06 -08:00
Tim Wojtulewicz
4c1b3c82d9 Merge remote-tracking branch 'origin/topic/vern/record-constructor-bug'
* origin/topic/vern/record-constructor-bug:
  bug fix for reporting poorly formed record constructors
2022-01-06 15:07:13 -07:00
Vern Paxson
16be867fef test suite alternative baseline fixes for recent test renaming 2022-01-06 13:54:07 -07:00
Tim Wojtulewicz
03b2adb312 Fixed local-compat test and added NEWS section for 5.0 2022-01-05 09:11:45 -07:00
Christian Kreibich
e0e779ade1 Bump the zeek-testing-cluster testsuite 2022-01-04 16:17:33 -08: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
Vern Paxson
4f566f35ee bug fix for reporting poorly formed record constructors 2021-12-22 14:26:03 -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
Christian Kreibich
e9bdaebc70 Add Github action job for cluster tests
This job runs in sequence after the image build one, using its resulting image.
The actual tests live in the external zeek-testing-cluster testsuite, which
the new job clones and runs.

To specify a version of the testsuite to use, testing/external/ has a new
commit-hash.zeek-testing-cluster file that tracks the testsuite's relevant
commit ref
2021-12-21 14:52:28 -08:00
Robin Sommer
a7427e95bf
Switch to recording unmodified HTTP header.
We used to attempt to remove any port specification before recording
HTTP host headers in logs. Doing so would (1) remove potentially useful
information, (2) not match what the documentation seemed to suggest, and
(3) fail for IP6 addresses containing colons.

We now record the original HOST header as is.

Addresses #1844.
2021-12-21 21:54:47 +01: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
fd56eddcfb Format Python scripts with yapf.
We also add a very basic yapf configuration file. Most of the changes in
this patch were performed automatically, but we broke one overly long
string into multiple components on `src/make_dbg_constants.py`.
2021-11-24 23:13:24 +01: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