Commit graph

1952 commits

Author SHA1 Message Date
Tim Wojtulewicz
8012914c16 Merge remote-tracking branch 'origin/topic/robin/gh-574-processing-status'
* origin/topic/robin/gh-574-processing-status:
  Make set_processing_status() signal-safe.
2020-08-24 14:44:06 -07:00
Tim Wojtulewicz
b687730a01 Merge remote-tracking branch 'origin/topic/jsiwek/gh-710-expire-func-type-check'
* origin/topic/jsiwek/gh-710-expire-func-type-check:
  GH-710: Check that &expire_func is a function and not hook/event
2020-08-24 14:30:58 -07:00
Tim Wojtulewicz
fec45a8be2 Merge remote-tracking branch 'origin/topic/jsiwek/extra-pktsrc-process'
* origin/topic/jsiwek/extra-pktsrc-process:
  Fix a case where PktSrc gets processed twice in one runloop iteration
2020-08-24 14:28:38 -07:00
Tim Wojtulewicz
60443e3178 Merge remote-tracking branch 'origin/topic/jsiwek/gh-594-improve-table-init-type-checking'
* origin/topic/jsiwek/gh-594-improve-table-init-type-checking:
  GH-594: Improve table initialization type-check error messages
2020-08-24 14:27:52 -07:00
Jon Siwek
9f802b2a4d Merge remote-tracking branch 'origin/topic/timw/fix-component-canon-name'
* origin/topic/timw/fix-component-canon-name:
  Fix issue with canonical names not printing for file analyzers
2020-08-21 13:47:31 -07:00
Jon Siwek
20dbc001a1 Remove definition-less ThreadVal<->BrokerData conversion functions
Their presence/deprecation may cause "undefined reference" build
failures for some compilers (GCC 9.3.0 in my case).
2020-08-21 13:33:42 -07:00
Tim Wojtulewicz
046eb58b75 Merge remote-tracking branch 'origin/topic/timw/266-namespaces-part4'
* origin/topic/timw/266-namespaces-part4: (34 commits)
  Add missing namespace to usage of get_exe_path in fuzzer
  Rename methods in RunState to remove 'net' from their names
  Move zeek::net namespace to zeek::run_state namespace.
  Move ScannedFile class and associated globals into ScannedFile.h and out of Net.h and scan.l
  Rename types in ZeekList.h to be consistent with the style guide
  Move NetVar from zeek to zeek::detail namespace
  Remove PRI_PTR_COMPAT macros
  Fix indentation of namespaced aliases
  Move zeek-setup code into namespaces
  Move ZeekList types to zeek namespace
  Move __RegisterBif from zeek::detail::plugin to zeek::plugin::detail
  Remove unimplemented zeek_magic_path/bro_magic_path method
  Move all plugin classes into zeek::plugin::detail namespaces
  Rename BroList.h to ZeekList.h
  Move a few smaller files to zeek namespaces
  Tag the end of some namespaces for consistency
  Move a few of the zeek::util methods and variables to zeek::util::detail
  Move zeekygen code to zeek::zeekygen::detail namespace
  Mark zeek::util::pad_size as constexpr, which provides a small performance improvement
  Move everything in util.h to zeek::util namespace.
  ...
2020-08-21 08:37:38 -07:00
Jon Siwek
038fb1c08e Improve stability of config/cluster_resend btest 2020-08-20 16:26:46 -07:00
Jon Siwek
903191e568 Merge remote-tracking branch 'origin/topic/timw/coverity'
* origin/topic/timw/coverity:
  Mark FileAssembler destructor as default, remove implementation
  Remove a few protected or private no-op constructors
  Properly initialize Timer::type. Fixes Coverity 1431144.
  Properly initialize members of Reassembler. Fixes Coverity 1413348.
  Fix a number of Coverity issues in Dict
2020-08-20 14:57:06 -07:00
Tim Wojtulewicz
8411adf9e1 Merge remote-tracking branch 'FlyingWithJerome/master'
* FlyingWithJerome/master:
  remove variables in netvar, use tabs in DNS.h and polish comments in dns events.
  add new line at the end of the test baseline
  add data+=option_len to skip unknown bytes
  better explanation to server cookie
  better explanation to server cookie
  add edns-cookie testcase
  remove data+=option_len error in cookie and keepalive
  add EDNS cookie parsing
  lazy commit
  lazy commit
  lazy commit
  add testcases
  add units (100ms) to comments
  initial adding EDNS TCP keepalive
2020-08-20 10:41:51 -07:00
Tim Wojtulewicz
f7bec7d7ef Merge remote-tracking branch 'origin/topic/jsiwek/strings-bif-warnings'
* origin/topic/jsiwek/strings-bif-warnings:
  Misc strings.bif adjustments
2020-08-19 14:36:12 -07:00
Tim Wojtulewicz
589dcf5697 Merge remote-tracking branch 'origin/topic/jsiwek/coverity-1431151'
* origin/topic/jsiwek/coverity-1431151:
  Use constexpr for IPAddr::v4_mapped_prefix declaration
2020-08-19 14:12:26 -07:00
Jon Siwek
69cbeb7a1b Update docs for configuring CI email notifications
Secrets are now stored organization-wide rather than per-repository.
2020-08-19 11:51:27 -07:00
Jon Siwek
3fc86a39b8 Merge remote-tracking branch 'origin/topic/robin/gh-467-addto'
- In this merge commit: fixed parentheses/typo that breaks compilation

* origin/topic/robin/gh-467-addto:
  Catch if &add_func/&delete_func is applied to IDs that don't have values.
2020-08-18 12:15:29 -07:00
Tim Wojtulewicz
b89935107d Merge remote-tracking branch 'origin/topic/timw/178-string-functions'
* origin/topic/timw/178-string-functions:
  GH-178: Add new string bif methods based on python string utilities
2020-08-14 10:00:29 -07:00
Johanna Amann
7f267d3e87 Merge remote-tracking branch 'origin/topic/jazoff/gh-1105'
* origin/topic/jazoff/gh-1105:
  Accept bracketed ipv6 addresses
2020-08-12 20:04:37 +00:00
Tim Wojtulewicz
c6e7d14757 Merge remote-tracking branch 'origin/topic/timw/open-dict'
* origin/topic/timw/open-dict: (40 commits)
  Move Dict constants to detail namespace
  Add a few missing deprecation fixes
  Adjust Dict whitespace/style
  Adjust more btest timings
  Improve termination reliability/speed for brokerstore btests
  General btest cleanup
  Update NEWS about change in Dictionary implementation
  Improve Intel expire-item btest to be less time-sensitive
  Improve btests with unstable table/set output ordering
  Update doc submodule
  Adjust a few btests that were unstable due to time-sensitivity
  Fix DNS script deleting a table element while iterating
  Improve a brokerstore btest to filter out Broker connection messages
  Sort output of a few SumStats cluster tests
  Fix extract_first_email_addr() to really return the first email
  Add find_all_ordered() BIF
  Extend external test suite canonifier with set-sorting logic
  Update btests/baselines for OpenDict compat
  Fix new/malloc/delete/free mismatches in Dictionary code
  Add explanation for a Dict TODO item
  ...
2020-08-11 11:38:14 -07:00
Jon Siwek
747c681ecf Merge remote-tracking branch 'origin/topic/jsiwek/gh-1100-multipart-body-length'
* origin/topic/jsiwek/gh-1100-multipart-body-length:
  GH-1100: Fix reported body-length of HTTP messages w/ sub-entities
2020-08-10 09:58:01 -07:00
Jon Siwek
8f4138262f Merge remote-tracking branch 'origin/topic/jsiwek/fix-fuzz-target-warnings'
* origin/topic/jsiwek/fix-fuzz-target-warnings:
  Fix deprecation warnings in fuzz targets
  Remove dbg_read_internal_state()
2020-08-05 12:36:33 -07:00
Johanna Amann
8e99d4b170 Merge remote-tracking branch 'origin/topic/jsiwek/gh-1080-error-on-enum-redefinition-conflict'
* origin/topic/jsiwek/gh-1080-error-on-enum-redefinition-conflict:
  Fix incorrect conflict detection of namespaced-enum-names
  Improve error message for an enum name conflicting with non-enum ID
  GH-1080: Treat enum name re-use across different enum types as an error
  GH-1080: Rename conflicting NetControl::DROP enum definitions

Fixes GH-1080
2020-08-04 20:25:40 +00:00
Tim Wojtulewicz
dbd8a4fc9f Merge remote-tracking branch 'origin/topic/jsiwek/silence-type-counter-warnings'
* origin/topic/jsiwek/silence-type-counter-warnings:
  Silence compiler warnings related to deprecated TYPE_COUNTER
2020-08-04 08:47:26 -07:00
Johanna Amann
22b401f52f Merge remote-tracking branch 'origin/topic/johanna/1095-just-get-rid-of-it'
* origin/topic/johanna/1095-just-get-rid-of-it:
  Re-add TYPE_COUNTER without function and deprecation marker.
  Completely remove all traces of the COUNTER type.
2020-08-03 10:44:43 -07:00
Tim Wojtulewicz
94e0298f2e Merge remote-tracking branch 'origin/topic/timw/266-namespaces-part3'
* origin/topic/timw/266-namespaces-part3: (24 commits)
  Properly forward-declare zeek::plugin::plugin in DebugLogger
  Rename Brofiler to ScriptCoverageManager
  Move Conn and related types to zeek namespace
  Move reassembler code to namespaces
  Move Session code to namespaces
  Move ODesc to zeek namespace
  Move Stats and related classes to zeek::detail
  Move a few low-use classes to namespaces
  Move DebugLogger to zeek namespaces
  Move all of the hashing classes/functions to zeek::detail namespace
  Move all of the Packet-related classes to namespaces
  Move EventMgr, EventHandler, and EventRegistry code to zeek namespace. Rename mgr to event_mgr.
  Move Timer and PriorityQueue classes to namespaces
  Move BroFile to zeek namespace, rename to File
  Move Reporter to zeek namespace
  Move DNS_Mgr to zeek::detail namespace
  Move BroSubstring to zeek::detail, rename to Substring
  Move regex matching code to zeek namespaces
  Move all of the rule matching code to zeek::detail
  Move IP Addr/Prefix/Header classes into namespaces
  ...
2020-08-01 09:22:03 -07:00
Johanna Amann
01fa5611ef Merge remote-tracking branch 'origin/topic/timw/clang-tidy'
* origin/topic/timw/clang-tidy:
  Don't specify 0u for initial value of loops changed to size_t
  Use .empty() instead of checking size against zero
  Use properly-sized loop variables or convert to ranged-for (bugprone-too-small-loop-variable)

Merge changes one type over to ptrdiff_t
2020-07-30 17:54:38 +00:00
Johanna Amann
aa3d94a3cd Merge remote-tracking branch 'origin/topic/jsiwek/gh-1083-fix-input-set-events'
* origin/topic/jsiwek/gh-1083-fix-input-set-events:
  GH-1083: Fix Input Framework 'change' events for 'set' destinations

Fixes GH-1083
2020-07-28 19:59:48 +00:00
Jon Siwek
8a5490405d Update site/local.zeek compatibility test 2020-07-27 12:05:10 -07:00
Jon Siwek
20c9e54f9b Reserve spot in NEWS for 4.0.0 2020-07-27 11:53:01 -07:00
Jon Siwek
5c6ebb443e Merge remote-tracking branch
* Fix potential NetbiosSSN analyzer stack overflow
2020-07-27 11:40:40 -07:00
Jon Siwek
97090ea18d Update submodules 2020-07-27 11:22:55 -07:00
Jon Siwek
b62fd71181 Misc/minor cleanup after reviewing new Broker table store code
Just some naming/style + minor memory management tweaks (avoid
some copies; use move semantics).
2020-07-24 14:00:24 -07:00
Jon Siwek
823d4e6220 Merge remote-tracking branch 'origin/topic/vladg/gh-1084'
* origin/topic/vladg/gh-1084:
  Add btest for GH-1084
  Update baselines
  MySQL: Fix parsing logic bug. We were correctly NOT expecting an EOF, but because we were parsing the header and then not parsing the rest, we would get out of sync
2020-07-24 11:41:16 -07:00
Tim Wojtulewicz
3eab3e600e Merge remote-tracking branch 'ronwellman/parse_ecs'
* ronwellman/parse_ecs:
  Avoid typecast to int& in EDNS parsing.
  Validate option_len in EDNS packets.
  Adjust for zeek namespace.
  Implement EDNS Client Subnet Option
2020-07-24 09:26:06 -07:00
Tim Wojtulewicz
ebc073ba92 Merge remote-tracking branch 'origin/topic/jsiwek/gh-1076-fix-random'
* origin/topic/jsiwek/gh-1076-fix-random:
  Deprecate bro_srandom(), replace with zeek::seed_random().
  Add zeek::max_random() & fix misuse of RAND_MAX w/ zeek::random_number()
  Deprecate bro_random(), replace with zeek::random_number()
  Deprecate bro_prng(), replace with zeek::prng()
  GH-1076: Fix bro_srandom() to replace 0 seeds with 1
  GH-1076: Fix bro_prng() implementation
  GH-1076: Fix use of getrandom()
2020-07-23 13:02:46 -07:00
Tim Wojtulewicz
ac57377a94 Merge remote-tracking branch 'origin/topic/jsiwek/gh-1068-zeek-include-dir'
* origin/topic/jsiwek/gh-1068-zeek-include-dir:
  GH-1068: Add zeek symlink to allow "zeek/Foo.h" include style
2020-07-23 08:32:20 -07:00
Tim Wojtulewicz
ebf0f65f55 Merge remote-tracking branch 'origin/topic/jsiwek/add-zeek-archiver-submodule'
* origin/topic/jsiwek/add-zeek-archiver-submodule:
  Update zeek-archiver submodule
  Add zeek-archiver tool as submodule
2020-07-21 12:40:13 -07:00
Robin Sommer
c3f4971eb2 Merge remote-tracking branch 'origin/topic/johanna/table-changes'
* origin/topic/johanna/table-changes: (26 commits)
  TableSync: try to make test more robust & add debug output
  Increase timeouts to see if FreeBSD will be happy with this.
  Try to make FreeBSD test happy with larger timeout.
  TableSync: refactor common functionality into function
  TableSync: don't raise &on_change, smaller fixes
  TableSync: rename auto_store -> table_store
  SyncTables: address feedback part 1 - naming (broker and zeek)
  BrokerStore <-> Zeek Tables: cleanup and bug workaround
  Zeek Table<->Brokerstore: cleanup, documentation, small fixes
  BrokerStore<->Zeek table: adopt to recent Zeek API changes
  BrokerStore<->Zeek Tables Fix a few small test failures.
  BrokerStore<->Zeek tables: allow setting storage location & tests
  BrokerStore<->Zeek tables: &backend works for in-memory stores.
  BrokerStore<->Zeek table - introdude &backend attribute
  BrokerStore<->Zeek tables: test for clones synchronizing to a master
  BrokerStore<->Zeek tables: load persistent tables on startup.
  Brokerstore<->Tables: attribute conflicts
  Zeek/Brokerstore updates: expiration
  Zeek/Brokerstore updates: add test that includes updates from clones
  Zeek/Brokerstore updates: first working end-to-end test
  ...
2020-07-21 15:39:39 +00:00
Jon Siwek
bd5108022f Merge remote-tracking branch 'origin/topic/timw/deprecation-fixes-for-spicy'
* origin/topic/timw/deprecation-fixes-for-spicy:
  Use namespaced version of Location to silence warnings
  Various deprecation fixes, reported by failed Spicy builds
  Add deprecated version of EnumType::GetVal() to returns EnumVal*, rename IntrusivePtr version to GetEnumVal
2020-07-17 16:37:30 -07:00
Jon Siwek
54c9f4a0e1 Merge remote-tracking branch 'origin/topic/timw/deprecation-fixes-for-spicy'
Merge adjustments:

- Revert unneeded changes in mmdb_dir lookups to fix build
- Fix deprecated EnumType::GetVal() to return +1 ref-count

* origin/topic/timw/deprecation-fixes-for-spicy:
  Various deprecation fixes, reported by failed Spicy builds
  Add deprecated version of EnumType::GetVal() to returns EnumVal*, rename IntrusivePtr version to GetEnumVal
2020-07-17 16:14:49 -07:00
Johanna Amann
a0c0236fb1 Merge remote-tracking branch 'origin/topic/jsiwek/util-fixes'
* origin/topic/jsiwek/util-fixes:
  Fix race condition in ensure_dir()
  Fix tokenize_string() to work with delimiters of length > 1
2020-07-17 22:34:48 +00:00
Robin Sommer
651831ad31 Merge remote-tracking branch 'origin/topic/jsiwek/gh-734-fix-lambda-escaping'
* origin/topic/jsiwek/gh-734-fix-lambda-escaping:
  GH-734: Improve handling of lambdas that escape enclosing frame
2020-07-17 10:19:18 +00:00
Robin Sommer
edaeb2f308 Merge remote-tracking branch 'origin/topic/jsiwek/gh-837-improve-broker-mismatch-errors'
* origin/topic/jsiwek/gh-837-improve-broker-mismatch-errors:
  GH-837: Add test cases for mismatched Broker SSL configs
  GH-837: emit Reporter errors for Broker errors
  Fix incorrect/missing Broker error status code numbers
2020-07-17 10:09:05 +00:00
Jon Siwek
fd8db24daf Merge remote-tracking branch 'origin/topic/jsiwek/gh-1062-fix-tag-subtypes'
* origin/topic/jsiwek/gh-1062-fix-tag-subtypes:
  GH-1062: fix integer conversion errors related to Tag subtypes
2020-07-14 19:11:09 -07:00
Johanna Amann
da2c968ba0 Merge remote-tracking branch 'origin/topic/jsiwek/gh-1024-broker-store-handle-type-checks'
* origin/topic/jsiwek/gh-1024-broker-store-handle-type-checks:
  Improve Broker store API's handling of invalid arguments
  Add builtin_exception() functions
  GH-1024: fix crash on passing wrong types to Broker store API

This was a bit of a bigger merge since Zeek changed inbetween the time
of the PR and me actually merging it.

I put the new functions into the zeek::detail namespace -- since it
seems unlikely that those will be used by something external.

I also renamed them to fit better with the naming scheme of the new
error functions.

Fixes GH-1024
2020-07-14 00:05:09 +00:00
Tim Wojtulewicz
75cb35e2d9 Merge remote-tracking branch 'origin/topic/jsiwek/gh-1019-deprecate-icmp-conn'
* origin/topic/jsiwek/gh-1019-deprecate-icmp-conn:
  GH-1019: deprecate icmp_conn params for ICMP events
2020-07-13 12:12:44 -07:00
Tim Wojtulewicz
64af3ec67a Merge remote-tracking branch 'origin/topic/jsiwek/deprecation-improvements'
* origin/topic/jsiwek/deprecation-improvements:
  Fix wrong frame offsets for locals of alternate event/hook prototypes
  Add deprecation expression to deprecated prototype/parameter messages
  Improve "use of deprecated prototype" warning message
  Emit deprecation warning for use of &deprecated function parameters
2020-07-13 12:11:12 -07:00
Jon Siwek
ba0ba7c684 Add more error checks to shadow log parsing
i.e. Coverity warns about possible use of ftell() negative return value
2020-07-10 11:21:49 -07:00
Jon Siwek
39f549ed68 Merge remote-tracking branch 'origin/topic/jsiwek/3.2-supervisor'
* origin/topic/jsiwek/3.2-supervisor:
  Integrate Supervisor code review suggestions
  Add Supervisor::{stdout,stderr}_hook
  Add Log::rotation_format_func and Log::default_rotation_dir options
  Allow Zeek function equality comparisons
  Implement leftover log rotation/archival for supervised nodes
  Move some supervisor structures to detail namespace
  Improve default supervisor stdout/stderr handling
  Factor Supervisor initialization data to separate struct from Stem
  Move ParentProcessCheckTimer to detail namespace
2020-07-09 14:13:26 -07:00
Jon Siwek
48362cc0c0 Merge remote-tracking branch 'origin/topic/jsiwek/remove-lexer-dead-code'
* origin/topic/jsiwek/remove-lexer-dead-code:
  scan.l: Remove "constant" did_module_restore logic
2020-07-08 17:47:07 -07:00
Jon Siwek
d15dd37b84 Merge remote-tracking branch 'origin/topic/jsiwek/fix-ci-freebsd-swig'
* origin/topic/jsiwek/fix-ci-freebsd-swig:
  Fix FreeBSD CI script to install right SWIG package
2020-07-08 12:25:31 -07:00
Robin Sommer
1fe822a745 Merge remote-tracking branch 'origin/topic/jsiwek/fix-while-stmt-ctor'
* origin/topic/jsiwek/fix-while-stmt-ctor:
  Fix WhileStmt to call Stmt(Tag) ctor
2020-07-08 15:41:50 +00:00