Commit graph

11716 commits

Author SHA1 Message Date
Dominik Charousset
27a39941db Add new Timer class to the telemetry API 2021-03-29 12:02:13 +02:00
Dominik Charousset
6e6b83bd96 Fix build with latest VectorVal API 2021-03-29 11:18:38 +02:00
Dominik Charousset
600d1118cd Update baselines 2021-03-29 10:47:32 +02:00
Dominik Charousset
e476911075 Prefix telemetry BIFs with __ 2021-03-29 10:47:32 +02:00
Dominik Charousset
2bac354e43 Expose telemetry API to scripting land 2021-03-29 10:47:32 +02:00
Dominik Charousset
d4466db5ce Add handle types for histogram metrics 2021-03-29 10:47:32 +02:00
Dominik Charousset
0b665ee130 Move duplicated code to detail header 2021-03-29 10:47:32 +02:00
Dominik Charousset
2a21f2903a Adhere to Zeek coding style 2021-03-29 10:47:32 +02:00
Dominik Charousset
7c5c36959f Apply suggestions from code review
Co-authored-by: Jon Siwek <jsiwek@corelight.com>
2021-03-29 10:47:32 +02:00
Dominik Charousset
443f7f0a18 Add telemetry Manager to Zeek setup / teardown 2021-03-29 10:47:32 +02:00
Dominik Charousset
83d7d2da4c Add missing whitespaces for Zeek coding style 2021-03-29 10:47:32 +02:00
Dominik Charousset
59d114005e Add gauge metric types 2021-03-29 10:47:32 +02:00
Dominik Charousset
617e4137c6 Add scaffold for new metrics API with counters 2021-03-29 10:47:32 +02:00
Jon Siwek
a5e7b2fec7 Update bundled CAF to 0.18.2 2021-03-27 14:18:30 -07:00
Jon Siwek
43d9bda007 Fix sign-compare compiler warning in coerce_to_record() 2021-03-26 21:59:30 -07:00
Jon Siwek
db975ac08e Fix maybe-uninitialized warning in ZVal::ToVal()
Some compilers warn that 'v' may be used uninitialized but shouldn't be
the case in practice since all cases are handled, making it impossible.
2021-03-26 19:10:36 -07:00
Jon Siwek
7047eb92d8 Change RecordVal::GetFieldAs() to use std::vector::operator[]
Since the method claims it's up to the user to ensure the field exists
before calling, the extra bounds-checking done by std::vector::at()
isn't needed.
2021-03-26 19:02:24 -07:00
Jon Siwek
2855df63ce Add RecordVal::AssignField() and use it in supervisor code
This is a convenience method to assign a known record field value by
field name.  May also be useful to reduce warnings from static analysis
(e.g. Coverity) about not checking for negative return values before
assigning since that now flows through a [[noreturn]] error path.
2021-03-26 18:57:42 -07:00
Jon Siwek
7bf885b0b8 Merge remote-tracking branch 'origin/topic/vlad/expose_supervisor_rotation_func'
- Restored a deprecated version of 'supervisor_rotation_format_func'
  during merge.

* origin/topic/vlad/expose_supervisor_rotation_func:
  Rename supervisor_rotation_format_func to archiver_rotation_format_func, and expose it for non-supervised setups
2021-03-26 17:18:52 -07:00
Jon Siwek
0eaeca6569 Update submodule(s) [nomail] [skip ci] 2021-03-26 16:51:30 -07:00
Jon Siwek
867abd0b99 Merge remote-tracking branch 'origin/topic/johanna/gh-1454'
* origin/topic/johanna/gh-1454:
  Heartbleed: fix substraction order.
2021-03-26 16:46:42 -07:00
Jon Siwek
a0859276bf Merge remote-tracking branch 'origin/topic/timw/analyzer-crash'
* origin/topic/timw/analyzer-crash:
  Fix crash in Analyzer::ForwardPacket due to recursive analyzer calls.
2021-03-26 16:40:12 -07:00
Jon Siwek
444fd8ff43 GH-960: Fix include order of bundled header files
Previously, a system-wide installation of any bundled auxil/ software
(like CAF) may get found/included rather than the bundled version and
possibly break the build.
2021-03-26 16:26:49 -07:00
Vlad Grigorescu
acfb21c5a6 Rename supervisor_rotation_format_func to archiver_rotation_format_func, and expose it for non-supervised setups
Closes #1463
2021-03-26 15:26:48 -05:00
Tim Wojtulewicz
fdf34c1f7b Include git sha in request to benchmark host 2021-03-25 17:38:02 -07:00
zeek-bot
cbd84dbe52 Update doc submodule [nomail] [skip ci] 2021-03-26 00:35:30 +00:00
Vern Paxson
297adf3486 function profiling rewritten - more detailed info, supports global profiling 2021-03-25 16:17:32 -07:00
Vern Paxson
bb3a69ebb3 track whether a given function/body should be included/skipped for optimization 2021-03-25 16:16:34 -07:00
Tim Wojtulewicz
d724df0b03 Merge remote-tracking branch 'origin/topic/vern/cpp-prep-factoring'
* origin/topic/vern/cpp-prep-factoring:
  test suite update due to factoring out coerce_to_record()
  removal of vestigial #include's (breaking an include loop in the process)
  better method name: HasCopySemantics()
  Use STL functionality to initialize coercion map
  comments for factored-out index slice functions
  support for subclassing ScriptFunc's, esp. for alternate lambda closures
  factor out record coercion; modernize management of coercion "map"
  lower-level method for adding fields to records
  factor out "print" statement's execution functionality
  functions for indexing slices and strings
  new function for getting the location, if any, associated with the current call
2021-03-25 11:38:33 -07:00
Tim Wojtulewicz
4015beb732 Fix crash in Analyzer::ForwardPacket due to recursive analyzer calls.
The change in 44f558df7b that made analyzer_list
a std::vector instead of a std::list doesn't take into account that in some
cases an analyzer may chain back into itself, such as with UDP-in-UDP tunnels.
In these cases, the second call to ForwardPacket may cause iterator
invalidation, leading to a crash.
2021-03-25 08:45:38 -07:00
Johanna Amann
c23e3ca105 Heartbleed: fix substraction order.
The larger number was substracted from the smaller one leading to an
integer overflow. However, no information was lost due to everything
also being present in the notice message.

Fixes GH-1454
2021-03-25 13:41:12 +00:00
Vern Paxson
e5a0b2c04c whitespace adjustment 2021-03-24 21:52:20 -07:00
Vern Paxson
3139cf2594 "balance" tests with multiple Zeek scripts to load the same elements 2021-03-24 21:37:26 -07:00
Vern Paxson
95b89be571 put global statements into a quasi-function to support script optimization 2021-03-24 21:22:03 -07:00
Jon Siwek
9ff3abb72c Update submodule(s) [nomail] [skip ci] 2021-03-24 18:05:46 -07:00
Jon Siwek
a31ad5d9da Merge branch 'master' of https://github.com/dopheide-esnet/zeek
* 'master' of https://github.com/dopheide-esnet/zeek:
  Sometimes user_agent is missing
2021-03-24 17:03:26 -07:00
Jon Siwek
c553df5dfe Add bin_dir setting for default zkg config file
Which defaults to `${zeek_install_prefix}/bin`, same as what a
standalone `zkg autoconfig` would use.
2021-03-24 15:53:10 -07:00
Vern Paxson
a288800b41 test suite update due to factoring out coerce_to_record() 2021-03-24 15:16:03 -07:00
Vern Paxson
a2e7dd82c4 removal of vestigial #include's (breaking an include loop in the process) 2021-03-24 15:15:19 -07:00
Vern Paxson
3e07564fb9 better method name: HasCopySemantics() 2021-03-24 15:03:03 -07:00
Vern Paxson
a7fcc7a5d8 Use STL functionality to initialize coercion map 2021-03-24 15:03:03 -07:00
Vern Paxson
8782894d7d comments for factored-out index slice functions 2021-03-24 15:03:03 -07:00
Vern Paxson
78f18b4fa6 support for subclassing ScriptFunc's, esp. for alternate lambda closures 2021-03-24 15:03:03 -07:00
Vern Paxson
91c2e05099 factor out record coercion; modernize management of coercion "map" 2021-03-24 15:03:00 -07:00
Vern Paxson
5f5ba3881c lower-level method for adding fields to records 2021-03-24 15:01:33 -07:00
Vern Paxson
22776167bb factor out "print" statement's execution functionality 2021-03-24 15:01:33 -07:00
Vern Paxson
b792feccab functions for indexing slices and strings 2021-03-24 15:01:19 -07:00
Michael Dopheide
83d5b44462 Sometimes user_agent is missing 2021-03-24 15:48:09 -05:00
Vern Paxson
8f2637decb new function for getting the location, if any, associated with the current call 2021-03-24 09:36:21 -07:00
Tim Wojtulewicz
8fb30f1d62 Update CHANGES and VERSION since git failed to update the merge commit 2021-03-23 20:46:00 -07:00