Commit graph

11634 commits

Author SHA1 Message Date
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
a015c09409 Fix issue with canonical names not printing for file analyzers 2020-08-21 12:40:30 -07:00
Jon Siwek
099797ae0f Update submodule(s)
[nomail]
2020-08-21 11:41:35 -07:00
Jon Siwek
bcef1fc871 Fix a case where PktSrc gets processed twice in one runloop iteration
For a non-live PktSrc, it had a special-case to be considered "ready"
every iteration, but additionally every 1 in 100 iterations (the polling
frequency), if there were no other "ready" IOSources, it would get added
to the "ready" set a 2nd time.

This commit completely excludes PktSrc from being processed during the
1/100 runloop iteration where a Poll() happens.  That exclusion is
desirable for a second reason: if reading a pcap happens to do its final
Process() during that 1/100 polling-iteration and there's other
IOSources ready to process like EventMgr/TimerMgr, those sources have
logic to advance network-time to current-time if a PktSrc is no longer
open.  So in such a case, PktSrc::Process() closes, then
EventMgr::Process() sees there's no longer an active PktSrc and advances
to current-time, then EventMgr::Drain() happens and may dispatch
various events that were previous scheduled, with those events now
unexpectedly seeing a network_time() returning current-time.
2020-08-21 10:26:36 -07:00
Tim Wojtulewicz
c322bc249d Update submodule(s)
[nomail]
2020-08-21 08:42:45 -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
Tim Wojtulewicz
73051135c2 Add missing namespace to usage of get_exe_path in fuzzer 2020-08-20 16:11:47 -07:00
Tim Wojtulewicz
54215ab9cd Rename methods in RunState to remove 'net' from their names 2020-08-20 16:11:47 -07:00
Tim Wojtulewicz
0ac3fafe13 Move zeek::net namespace to zeek::run_state namespace.
This also moves all of the code from Net.{h,cc} to RunState.{h,cc} and marks Net.h as deprecated
2020-08-20 16:11:47 -07:00
Tim Wojtulewicz
d608e7c9a5 Move ScannedFile class and associated globals into ScannedFile.h and out of Net.h and scan.l 2020-08-20 16:11:47 -07:00
Tim Wojtulewicz
01ce18894b Rename types in ZeekList.h to be consistent with the style guide 2020-08-20 16:11:47 -07:00
Tim Wojtulewicz
a34e632eef Move NetVar from zeek to zeek::detail namespace 2020-08-20 16:11:46 -07:00
Tim Wojtulewicz
476e98b413 Remove PRI_PTR_COMPAT macros 2020-08-20 16:11:46 -07:00
Tim Wojtulewicz
4b61d60e80 Fix indentation of namespaced aliases 2020-08-20 16:11:46 -07:00
Tim Wojtulewicz
6a3f98c835 Move zeek-setup code into namespaces 2020-08-20 16:11:46 -07:00
Tim Wojtulewicz
e78e68b249 Move ZeekList types to zeek namespace 2020-08-20 16:11:46 -07:00
Tim Wojtulewicz
81c70df62c Move __RegisterBif from zeek::detail::plugin to zeek::plugin::detail 2020-08-20 16:11:46 -07:00
Tim Wojtulewicz
35d72a68e8 Remove unimplemented zeek_magic_path/bro_magic_path method 2020-08-20 16:11:46 -07:00
Tim Wojtulewicz
6b60a20360 Move all plugin classes into zeek::plugin::detail namespaces 2020-08-20 16:11:46 -07:00
Tim Wojtulewicz
106a92a9a8 Rename BroList.h to ZeekList.h 2020-08-20 16:11:46 -07:00
Tim Wojtulewicz
db36688bf0 Move a few smaller files to zeek namespaces 2020-08-20 16:11:46 -07:00
Tim Wojtulewicz
812ac5536d Tag the end of some namespaces for consistency 2020-08-20 16:11:46 -07:00
Tim Wojtulewicz
ddf48d7529 Move a few of the zeek::util methods and variables to zeek::util::detail 2020-08-20 16:11:44 -07:00
Tim Wojtulewicz
5a2ac84eee Move zeekygen code to zeek::zeekygen::detail namespace 2020-08-20 16:00:35 -07:00
Tim Wojtulewicz
80ebb4b67a Mark zeek::util::pad_size as constexpr, which provides a small performance improvement 2020-08-20 16:00:35 -07:00
Tim Wojtulewicz
8d2d867a65 Move everything in util.h to zeek::util namespace.
This commit includes renaming a number of methods prefixed with bro_ to be prefixed with zeek_.
2020-08-20 16:00:33 -07:00
Tim Wojtulewicz
8862b585fa Deprecate ptr_compat_uint and ptr_compat_int in util.h 2020-08-20 15:55:17 -07:00
Tim Wojtulewicz
289c03d386 Move NetVar.h to zeek namespace 2020-08-20 15:55:17 -07:00
Tim Wojtulewicz
e7c6d51ae7 Move the functions and variables in Net.h to the zeek::net namespace. This includes moving network_time out of util.h. 2020-08-20 15:55:17 -07:00
Tim Wojtulewicz
ca9baec6e8 Add namespaced version of trigger_mgr, fix a couple uses of event_registry 2020-08-20 15:55:17 -07:00
Tim Wojtulewicz
715ca6549b Move the remainder of the analyzers to zeek namespaces 2020-08-20 15:55:17 -07:00
Tim Wojtulewicz
914ffcadae Move arp, tcp, udp, pia, and stepping stone analyzers 2020-08-20 15:55:17 -07:00
Tim Wojtulewicz
f1cfd5aa2b Move bro_broker code to zeek::Broker namespace 2020-08-20 15:55:17 -07:00
Tim Wojtulewicz
cba1bc18a5 Move notifier code to zeek::notifier::detail namespace 2020-08-20 15:55:17 -07:00
Tim Wojtulewicz
1262109e5a Move threading classes to zeek namespaces 2020-08-20 15:55:17 -07:00
Tim Wojtulewicz
f310795d79 Move probabilistic code into zeek namespaces 2020-08-20 15:55:17 -07:00
Tim Wojtulewicz
be92bd536f Move iosource code to zeek namespaces 2020-08-20 15:55:17 -07:00
Tim Wojtulewicz
45b5c6e619 Move logging code to zeek namespaces 2020-08-20 15:55:17 -07:00
Tim Wojtulewicz
9a800265ff Move input code to zeek namespaces 2020-08-20 15:55:17 -07:00
Tim Wojtulewicz
14408235b8 Move file_analysis code to zeek namespaces 2020-08-20 15:55:17 -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
FlyingWithJerome
512361ce12 remove variables in netvar, use tabs in DNS.h and polish comments in dns events. 2020-08-20 11:02:44 -04:00
FlyingWithJerome
4a3396d525 add new line at the end of the test baseline 2020-08-20 09:04:56 -04:00
FlyingWithJerome
3b3197106d add data+=option_len to skip unknown bytes 2020-08-20 09:04:56 -04:00
FlyingWithJerome
69c8b01f58 better explanation to server cookie 2020-08-20 09:04:56 -04:00
FlyingWithJerome
fe6efc8524 better explanation to server cookie 2020-08-20 09:04:56 -04:00
FlyingWithJerome
28576d3a84 add edns-cookie testcase 2020-08-20 09:04:56 -04:00
FlyingWithJerome
d75a385f8f remove data+=option_len error in cookie and keepalive 2020-08-20 09:04:56 -04:00