Commit graph

11634 commits

Author SHA1 Message Date
Jon Siwek
67835a6520 Extend external test suite canonifier with set-sorting logic
Two new canonifiers: one to sort the contents of conn.log "service"
field and another to sort the contents of any field of type "set".
2020-08-11 11:26:21 -07:00
Jon Siwek
94aee910d5 Update btests/baselines for OpenDict compat
Haven't checked different build configurations yet, but all except
a few SumStats tests are stable for me now.  The external tests
are also completely failing, but haven't looked at those yet.
2020-08-11 11:26:21 -07:00
Jon Siwek
37d3cfbd44 Fix new/malloc/delete/free mismatches in Dictionary code 2020-08-11 11:26:21 -07:00
Jon Siwek
d566b8ca31 Add explanation for a Dict TODO item 2020-08-11 11:26:21 -07:00
Jon Siwek
1d33dbc6bc Fix compiler warning in Dictionary debug/dump printf format string 2020-08-11 11:26:21 -07:00
Tim Wojtulewicz
0c7e4d62ee Overwrite old Dict.h/cc with new ones 2020-08-11 11:26:21 -07:00
Tim Wojtulewicz
78298e99b7 Extend the timeouts on a few intel tests, update baselines 2020-08-11 11:26:21 -07:00
Tim Wojtulewicz
30fa514d30 Updating test baselines for new dictionary code due to changes in ordering of fields in the dictionary 2020-08-11 11:26:21 -07:00
Tim Wojtulewicz
351aca5e52 Add namespaces for OpenDict files 2020-08-11 11:26:21 -07:00
Tim Wojtulewicz
59d5c85903 Add unit tests from Dict into OpenDict files 2020-08-11 11:26:21 -07:00
Tim Wojtulewicz
32653c86af Build fixups
- Fix some clang-tidy warnings
- Add std:: namespaces for ofstream and ios
- Remvoe some unused methods
2020-08-11 11:26:21 -07:00
jasonlue
394e067f7b Massive formatting cleanup 2020-08-11 11:26:21 -07:00
jasonlue
2a0609431c Remove key reference after insertion because the key may become invalid afterwards. 2020-08-11 11:26:21 -07:00
jasonlue
d3eeeb0f4c add Clustered Hashing based Open Addressing Dict. To replace the existing dict, #define USE_OPEN_DICT 2020-08-11 11:26:21 -07:00
Tim Wojtulewicz
5d764d6678 GH-178: Add new string bif methods based on python string utilities 2020-08-11 10:40:30 -07:00
Jon Siwek
6e7ff1e980 Update submodule(s)
[nomail]
2020-08-10 14:13:32 -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
Tim Wojtulewicz
a243c0e4a6 Overwrite old Dict.h/cc with new ones 2020-08-09 21:27:23 -07:00
Tim Wojtulewicz
b8287a3375 Fix issue with sumstats script and fix baselines that were crashing previously 2020-08-09 21:13:12 -07:00
Tim Wojtulewicz
7496cf14c7 Extend the timeouts on a few intel tests, update baselines 2020-08-09 21:13:12 -07:00
Tim Wojtulewicz
21872aef39 Updating test baselines for new dictionary code due to changes in ordering of fields in the dictionary 2020-08-09 21:13:10 -07:00
Tim Wojtulewicz
10e4694f8e Add namespaces for OpenDict files 2020-08-09 21:12:19 -07:00
Tim Wojtulewicz
8f0e8037ba Add unit tests from Dict into OpenDict files 2020-08-09 21:12:19 -07:00
Tim Wojtulewicz
ed0f9f3564 Build fixups
- Fix some clang-tidy warnings
- Add std:: namespaces for ofstream and ios
- Remvoe some unused methods
2020-08-09 21:12:19 -07:00
jasonlue
a2476ed91d Massive formatting cleanup 2020-08-09 21:12:19 -07:00
jasonlue
b0bd432f57 Remove key reference after insertion because the key may become invalid afterwards. 2020-08-09 21:12:19 -07:00
jasonlue
19f063f2a3 add Clustered Hashing based Open Addressing Dict. To replace the existing dict, #define USE_OPEN_DICT 2020-08-09 21:12:19 -07:00
Justin Azoff
211789bbb3 Accept bracketed ipv6 addresses 2020-08-05 17:18:36 -04: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
Jon Siwek
5d5adcbffd Fix deprecation warnings in fuzz targets 2020-08-04 16:28:19 -07:00
Jon Siwek
c8c2c6952f Remove dbg_read_internal_state()
It's never had a definition anyway and the namespacing/deprecation
process was now causing a compile error in debug/fuzzing builds for me w/ GCC:

src/fuzzers/libzeek_fuzzer_shared.so: error: undefined reference to 'zeek::detail::dbg_read_internal_state()'
2020-08-04 16:23:26 -07:00
Jon Siwek
363b167bd2 GH-1100: Fix reported body-length of HTTP messages w/ sub-entities
The body-lengths of sub-entities, like multipart messages, got counted
twice by mistake: once upon the end of the sub-entity and then again
upon the end of the top-level entity that contains all sub-entities.
The size of just the top-level entity is the correct one to use.
2020-08-04 14:21:03 -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
Johanna Amann
e31dda6989 Update submodule
[nomail]
2020-08-04 13:08:57 -07:00
Seth Hall
7f4914c219 Fix config reader regular expression for MUSL.
It was not dealing with multiple spaces between the key and the value
with MUSL correctly. This change ensures that if a value exists, that it
begins and ends with a non-blank character.
2020-08-04 12:35:20 -04: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
Jon Siwek
f1b0d9a8f0 Silence compiler warnings related to deprecated TYPE_COUNTER 2020-08-03 16:56:07 -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
bd983bec8f Update submodule(s)
[nomail]
2020-08-01 09:23:00 -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
Jon Siwek
26ad26c101 Fix incorrect conflict detection of namespaced-enum-names
E.g. defining a `Foo::RED` enum name when a `GLOBAL::RED` identifier
already exists would previously be treated as an error, even though the
names don't truly conflict.
2020-07-31 16:44:49 -07:00
Jon Siwek
69c0cf1513 Improve error message for an enum name conflicting with non-enum ID 2020-07-31 16:24:26 -07:00
Jon Siwek
4a9567e04f GH-1080: Treat enum name re-use across different enum types as an error 2020-07-31 16:23:40 -07:00
Jon Siwek
613b27eec7 GH-1080: Rename conflicting NetControl::DROP enum definitions
``NetControl::DROP`` had 3 conflicting definitions that could potentially
be used incorrectly without any warnings or type-checking errors.
Such enum redefinition conflicts are now caught and treated as errors,
so the ``NetControl::DROP`` enums had to be renamed:

* The use as enum of type ``Log::ID`` is renamed to ``NetControl::DROP_LOG``

* The use as enum of type ``NetControl::CatchReleaseInfo`` is renamed to
  ``NetControl::DROP_REQUESTED``

* The use as enum of type ``NetControl::RuleType`` is unchanged and still
  named ``NetControl::DROP``
2020-07-31 16:11:35 -07:00
Johanna Amann
cd3400f957 Re-add TYPE_COUNTER without function and deprecation marker. 2020-07-31 14:53:49 -07:00
Tim Wojtulewicz
7a4023a17f Properly forward-declare zeek::plugin::plugin in DebugLogger 2020-07-31 16:26:11 -04:00
Tim Wojtulewicz
3e6ba198db Rename Brofiler to ScriptCoverageManager 2020-07-31 16:26:11 -04:00
Tim Wojtulewicz
7fefdd97af Move Conn and related types to zeek namespace 2020-07-31 16:25:54 -04:00
Tim Wojtulewicz
0355d13099 Move reassembler code to namespaces 2020-07-31 16:25:54 -04:00
Tim Wojtulewicz
e3ee1860b8 Move Session code to namespaces 2020-07-31 16:25:54 -04:00