Commit graph

6667 commits

Author SHA1 Message Date
Johanna Amann
f77213ba66 Deprecation and warning fixes 2022-01-05 10:41:55 +00:00
Johanna Amann
9e5c4ae700 Clang-format updates 2022-01-05 10:28:26 +00:00
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
Vern Paxson
9970f45ecb deprecation warning on use of out-of-scope local 2021-12-25 16:03:53 -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
Vern Paxson
06ffd97749 fixes for double-delete and reducing '?' operator with constant alternatives 2021-12-14 15:36:03 -08:00
Vern Paxson
5e71e757fe correct usage info for -u flag; -uu no longer supported 2021-12-14 11:37:51 -08:00
Tim Wojtulewicz
4920b6affb Merge remote-tracking branch 'origin/topic/vern/cpp-incr'
* origin/topic/vern/cpp-incr:
  tweak to keep clang-format happy
  minor note regarding improving performance of C++-generated code
  factoring of generating C++ initializations, no semantic changes
  restored support for incremental compilation of scripts to C++
  fixes for -O gen-standalone-C++
  new ZEEK_FILE_ONLY and ZEEK_FUNC_ONLY environment variables for debugging script optimization - replaces ZEEK_ONLY
  fix for compiling record constructors to C++
  fixes for compiling vector operations to C++
  fixed for profiling missing some profile elements
  removing vestigial methods
  minor efficiency tweak for ZAM record construction
2021-12-14 11:35:11 -07:00
Tim Wojtulewicz
7de9a7d76f GH-1860: Add double_to_int() bif 2021-12-13 10:46:14 -07:00
Tim Wojtulewicz
f2b74d21f7 Merge remote-tracking branch 'origin/topic/timw/null-checks'
* origin/topic/timw/null-checks:
  Check for sets before attempting to check for same Yield types
  Add early bail-outs to same_type()
  Fix types for Analyzer::register_for_port(s) to be the same
2021-12-13 09:41:48 -07:00
Vern Paxson
a10fafe398 tweak to keep clang-format happy 2021-12-12 12:43:30 -08:00
Vern Paxson
3fc58bdd9f minor note regarding improving performance of C++-generated code 2021-12-12 12:42:16 -08:00
Vern Paxson
86288426fb factoring of generating C++ initializations, no semantic changes 2021-12-12 12:41:16 -08:00
Vern Paxson
2f7137999f restored support for incremental compilation of scripts to C++ 2021-12-12 12:36:45 -08:00
Vern Paxson
3b3cea799b fixes for -O gen-standalone-C++ 2021-12-12 12:36:08 -08:00
Vern Paxson
d5e7db1070 new ZEEK_FILE_ONLY and ZEEK_FUNC_ONLY environment variables for debugging script optimization - replaces ZEEK_ONLY 2021-12-12 12:34:50 -08:00
Vern Paxson
96ed944571 fix for compiling record constructors to C++ 2021-12-12 12:34:23 -08:00
Vern Paxson
52ed9351a9 fixes for compiling vector operations to C++ 2021-12-12 12:33:38 -08:00
Vern Paxson
4ea5785908 fixed for profiling missing some profile elements 2021-12-12 12:33:06 -08:00
Vern Paxson
ce7f886077 removing vestigial methods 2021-12-12 12:32:27 -08:00
Vern Paxson
bbae2cf36c minor efficiency tweak for ZAM record construction 2021-12-12 12:31:28 -08:00
Tim Wojtulewicz
29b0d32fef Check for sets before attempting to check for same Yield types 2021-12-10 20:50:03 +00:00
Vern Paxson
9069e744f9 replace --optimize-only with --optimize-funcs and --optimize-files 2021-12-10 12:45:27 -08:00
Tim Wojtulewicz
aa91f72b34 Merge remote-tracking branch 'origin/topic/vern/cpp-add-option2'
* origin/topic/vern/cpp-add-option2:
  reintroduction of "-O add-C++" option
2021-12-10 13:13:26 -07:00
Tim Wojtulewicz
56b421db9f Merge remote-tracking branch 'origin/topic/vern/cpp-maint-dec21'
* origin/topic/vern/cpp-maint-dec21:
  fixes for vector operations
  flag globals initialized to opaque values as non-compilable
  skip type signatures for lambdas
  fix for translating filenames beginning with numbers to C++ variable names
  remove unnecessary includes
2021-12-10 13:12:58 -07:00
Tim Wojtulewicz
79326ba62c Merge remote-tracking branch 'origin/topic/vern/cpp-record-constructor'
* origin/topic/vern/cpp-record-constructor:
  update script-to-C++ compilation for new record constructor internals
2021-12-10 13:11:45 -07: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
6f61463a48 Add early bail-outs to same_type() 2021-12-10 19:49:51 +00:00
Vern Paxson
8c59626eb9 reintroduction of "-O add-C++" option 2021-12-10 10:19:23 -08:00
Vern Paxson
ac74943f26 fixes for vector operations 2021-12-10 09:32:42 -08:00
Vern Paxson
6788be94c9 flag globals initialized to opaque values as non-compilable 2021-12-10 09:31:41 -08:00
Vern Paxson
53342fdd29 skip type signatures for lambdas 2021-12-10 09:27:58 -08:00
Vern Paxson
474a2edc98 fix for translating filenames beginning with numbers to C++ variable names 2021-12-10 09:27:21 -08:00
Vern Paxson
9d884c0285 remove unnecessary includes 2021-12-10 09:27:07 -08: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
Christian Kreibich
3b3a812477 Merge branch 'topic/christian/json-configurable-absent-fields'
* topic/christian/json-configurable-absent-fields:
  Add LogAscii::json_include_unset_fields flag to control unset field rendering
2021-12-09 13:45:49 -08:00
Tim Wojtulewicz
b966a3876f GH-1741: Print error if calling a non-hook with hook keyword 2021-12-09 14:35:40 -07:00
Tim Wojtulewicz
c15a9eab7f GH-1740: Report a better error message if table key is not a list 2021-12-09 14:35:21 -07:00
Johanna Amann
e1dc09e230 Improve error message for clash between variable and function name
The previous error message was very cryptic and led to an abort.

Fixes GH-1832
2021-12-09 19:15:33 +00: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
Christian Kreibich
ea20b8e55e Merge branch 'topic/christian/doctest-in-packages'
* topic/christian/doctest-in-packages:
  Update cmake and auxil/zeek-aux submodules
  Remove the --enable-cpp-tests configure flag in Cirrus CI
  Add testcases for plugin with doctest usage
  Flip unit tests to being enabled by default
  Support for unit tests in plugins
  Alphabetically sort configure's enable/disable/with options
2021-12-06 17:08:27 -08:00
Christian Kreibich
5c44dfbb9e Flip unit tests to being enabled by default
This flips --enable-cpp-tests to --disable-cpp-tests, enabling unit testing by
default. The help output has a minor corresponding tweak as well.
2021-12-06 12:17:22 -08:00
Christian Kreibich
f20f8ad4a8 Support for unit tests in plugins
This pushes the unit test kickoff down in the Zeek startup sequence, to give
plugins a chance to register. It also enforces deterministic mode for unit
testing, since without it some unit tests start to have nondeterministic results
at that stage.
2021-12-06 12:17:22 -08:00
Tim Wojtulewicz
f44ea32df8 Merge remote-tracking branch 'origin/topic/timw/remove-tag-types'
* origin/topic/timw/remove-tag-types:
  Remove separate Tag types, note breaking change in NEWS
2021-12-06 11:29:49 -07:00
Tim Wojtulewicz
acb5e5dd26 Remove separate Tag types, note breaking change in NEWS 2021-12-06 11:25:13 -07:00
Vern Paxson
a1324a882d update script-to-C++ compilation for new record constructor internals 2021-12-06 09:39:58 -05:00
Vern Paxson
3f9f47980a updates to ZAM to track recent changes in script semantics 2021-12-04 20:24:39 -05:00
Tim Wojtulewicz
d50dade24c GH-1768: Properly cleanup existing log stream when recreated on with the same ID 2021-12-03 13:46:28 -07:00