Commit graph

265 commits

Author SHA1 Message Date
Jon Siwek
1e4964de77 Preallocate all possible PortVals.
The performance benefit is small (maybe ~1% at most), however, it's a
trivial change without downsides.
2017-12-11 15:29:28 -06:00
Hilko Bengen
ea4cf7dbe9 Adapt most of the X509 support to OpenSSL 1.1 2017-12-06 00:07:49 +01:00
Johanna Amann
7aa219758c Merge remote-tracking branch 'origin/master' into topic/johanna/ocsp-new 2017-03-16 12:28:08 -07:00
Pete
05746ab7fc print version string to stdout on --version
When running a *nix command from the prompt, and output is expected, that output should be sent to stdout, not stderr.  The --version option is such a case.  The outputted version string is not an indication of error or a diagnostic output; it is the expected output, thus should follow standard conventions and be output to stdout..
2017-03-12 12:53:12 -04:00
Johanna Amann
e1bcc4509f OCSP: rewrite events and data structures.
Instead of having a big event, that tries to parse all the data into a
huge datastructure, we do the more common thing and use a series of
smaller events to parse requests and responses.

The new events are:

ocsp_request -> raised for an ocsp request, giving version and requestor

ocsp_request_certificate -> raised n times per request, once per cert

ocsp_response_status -> raised for each ocsp response, giving status

ocsp_response_bytes -> raised for each ocsp response with information

ocsp_response_certificate -> raised for each cert in an ocsp response
2017-02-10 17:03:18 -08:00
Johanna Amann
9c6cebf324 OCSP: a bunch of whitespace fixes 2017-02-10 17:03:04 -08:00
Johanna Amann
dfc871f831 Merge remote-tracking branch 'origin/master' into topic/johanna/ocsp 2017-02-08 10:35:12 -08:00
Robin Sommer
982612b66f Merge remote-tracking branch 'origin/topic/johanna/remove-z'
BIT-1663 #merged

* origin/topic/johanna/remove-z:
  Remove -z/--analysis option.
2016-08-05 15:26:48 -07:00
Johanna Amann
39d811ff06 Remove code for XML serialization.
Code was apparently defunct and was not user-accessible for a long time.
2016-08-05 14:02:28 -07:00
Johanna Amann
b7ab6a5332 Remove -z/--analysis option.
It was only used for one special case that is not commonly used by
anyone.
2016-08-04 17:44:38 -07:00
Robin Sommer
d7c10ca7c3 Removing OpenSSL dependency for plugins.
Compiling a plugin required having access to OpenSSL headers because
they were pulled in by Bro headers that the plugin had to include.
Removinng then OpenSSL dependency from those Bro headers.

I'm also reverting a4e5591e. This is a different fix for the same
problem, and reverting that commit gives us a test case. :-)
2016-08-01 12:32:27 -07:00
Johanna Amann
499ed5b566 Remove the -K/-J options for setting keys.
The options were never really used and do not seem especially useful;
initialization with a seed file still works.

This also fixes a bug with the initialization of the siphash key.
2016-07-13 16:57:53 -07:00
Johanna Amann
e1218cc7fa Change Hashing from H3 to Siphash.
This commit mostly changes the hash function that is used for Internal
hashing of data < 36 bytes from H3 to Siphash. This change is motivated
by the fact that it turns out that H3 apparently does not deliver a very
good source of data uniqueness; running HLL with H3 as a hashing
function results in quite poor results (up to of 75% off in my tests).
In difference, running HLL with Siphash (or HMAC-MD5) changes this
factor to ~2%.

This also fixes a long-standing bug in Hash.h which truncated our hash
values to 32 bit on most machines.

Furthermore, it once again fixes a problem with the Rank function in
HLL.
2016-07-13 06:44:51 -07:00
Johanna Amann
b2371752e4 Merge remote-tracking branch 'origin/topic/dnthayer/ticket1616'
I changed the patch slightly - now debug.log is only created, if a debug
stream is enabled.

BIT-1616 #merged

* origin/topic/dnthayer/ticket1616:
  Don't create debug.log immediately upon startup
2016-06-07 11:09:22 -07:00
Daniel Thayer
0cae2ca003 Don't create debug.log immediately upon startup
Instead of creating the debug.log immediately when bro starts,
now it is created only after the debug streams are enabled.
This avoids having an empty log being created when it shouldn't be,
in usages such as "bro -h", "bro -v", or "bro -B help" (and also
when using broctl, which needs to run "bro -v").
2016-06-04 17:16:25 -05:00
Seth Hall
6d836b7956 More stats improvements
Broke out the stats collection into a bunch of new Bifs
in stats.bif.  Scripts that use stats collection functions
have also been updated.  More work to do.
2016-01-07 16:20:24 -05:00
Johanna Amann
da9b5425e4 Merge remote-tracking branch 'origin/master' into topic/johanna/ocsp 2015-12-14 16:05:41 -08:00
Robin Sommer
952c64a793 Delaying BinPAC initializaton until afte plugins have been activated. 2015-12-04 16:40:43 -08:00
Robin Sommer
36b5a4db08 Merge branch 'master' of https://github.com/knielander/bro
I reworked this a bit:

    - Moved the globals into a new Pcap::* namespace, and renamed them
      slightly.

    - Moved the definitions of the globals into pcap/const.bif.

    - Also moved the existing 'snaplen' into Pcap::* and removed
      SnapLen() from the PktSrc API (it's really a pcap thing).

    - Likewise moved the existing functions precompile_pcap_filter,
      install_pcap_filter, and pcap_error, into Pcap::*.

    - Did some more refactoring for the pcap code.

* 'master' of https://github.com/knielander/bro:
  Refactored patch (removed options, less ambiguous name)
  Allow Bro to run in fanout mode.
  Allow libpcap buffer size to be set manually.
  Allow Bro to run in fanout mode.
  Allowed libpcap buffer size to be set via configuration.
2015-08-30 22:09:32 -07:00
Kris Nielander
ba4c816b0e Refactored patch (removed options, less ambiguous name) 2015-08-24 23:45:21 +02:00
Kris Nielander
d8c9b7255e Allow Bro to run in fanout mode. 2015-08-09 22:45:23 +02:00
Kris Nielander
f5429ee794 Allow libpcap buffer size to be set manually. 2015-08-09 22:45:09 +02:00
Liang Zhu
e9f028be4c Merge remote-tracking branch 'origin/master' into topic/liangzhu/analyzer-ocsp 2015-07-28 13:47:21 -07:00
Robin Sommer
3957091e1b Renaming config.h to bro-config.h.
A couple times now I had this conflicting with files of the same name
in other projects.
2015-07-28 11:57:04 -07:00
Liang Zhu
da122a6a14 Merge remote-tracking branch 'origin/master' into topic/liangzhu/analyzer-ocsp 2015-07-02 16:48:51 -07:00
Daniel Thayer
368c1463ab Restore the --load-seeds cmd-line option
Also enabled the short options -G/-H for --load-seeds/--save-seeds.
2015-06-23 13:16:31 -05:00
Robin Sommer
b98708bf14 Removing dead code for no longer supported -G switch. 2015-06-19 16:27:08 -07:00
Daniel Thayer
6c812bd5d6 Put cmd-line options in alphabetical order
Sorted cmd-line options in alphabetical order to make it easier to
add or remove options (or even to just check if they're listed
correctly in the source code).
2015-06-18 12:39:46 -05:00
Liang Zhu
e9baddfd6b add a file analyzer to parse ocsp request and response
add two events: ocsp_request and ocsp_response
2015-06-15 11:05:04 -07:00
Daniel Thayer
26007f419e Update usage output and list of cmd-line options 2015-04-29 23:56:55 -05:00
Daniel Thayer
1508b00489 Update NEWS and code for removal of -O cmd-line option 2015-04-28 16:33:33 -05:00
Robin Sommer
8f95a38885 Merge remote-tracking branch 'origin/topic/jsiwek/bit-1384'
* origin/topic/jsiwek/bit-1384:
  BIT-1384: Remove -O (optimize scripts) command-line option.

BIT-1384 #merged
2015-04-27 17:26:12 -07:00
Daniel Thayer
ab917bd48c Fix the -J/--set-seed cmd-line option 2015-04-27 18:30:35 -05:00
Daniel Thayer
c008cd3fcb Remove unused -l, -L, and -Z cmd-line options 2015-04-27 17:58:04 -05:00
Daniel Thayer
85f4f4102d Fix the --time and --re-level cmd-line options 2015-04-27 17:45:01 -05:00
Jon Siwek
b42706f0b5 BIT-1384: Remove -O (optimize scripts) command-line option. 2015-04-27 14:45:02 -05:00
Robin Sommer
1132470b05 Cleaning up --help.
-D and -Y/y were still listed, even though they had no effect anymore.
Removing some dead code along with -D.

BIT-1372 #closed
2015-04-10 17:05:49 -07:00
Jon Siwek
2aae90d4f2 Remove stale signature benchmarking code (-L command-line option).
I don't think this is seeing much use or will ever see much use, and
unless compilers optimize it out, it's just wasting cycles.
2015-04-06 15:46:08 -05:00
Robin Sommer
1dbc5ed523 bro -B <x> now supports "all" and "help" for <x>.
"all" enables all debug streams. "help" prints a list of available
debug streams.

Based on patch by John Donnelly.

BIT-1313 #merged
2015-03-23 11:39:09 -07:00
Jon Siwek
9e53722b57 Rename comm/ directories to broker/ 2015-03-05 17:02:25 -06:00
Jon Siwek
fa08083a92 Rename broker-related namespaces.
c++ namespace "comm" -> bro_broker
script module "Comm" -> BrokerComm
script module "Store" -> BrokerStore
2015-03-05 16:20:51 -06:00
Robin Sommer
dfc88094ab Merge remote-tracking branch 'origin/topic/jsiwek/broker'
* origin/topic/jsiwek/broker: (34 commits)
  Update broker submodule.
  Update broker submodule.
  broker integration: add missing baselines for doc tests
  broker integration: add prof.log statistics
  broker integration: add high-level usage documentation
  broker integration: add API documentation (broxygen/doxygen)
  broker integration: fix memory leak, add leak tests
  Update broker submodule.
  Improve comm tests.
  Fix gcc compile warnings.
  broker integration: fix unit tests to work when broker is not enabled.
  Add --enable-c++11 configure flag.
  broker integration: add (un)publish/(un)advertise functions
  broker integration: add knobs to set auto publish/advertise behavior
  broker integration: move listen port for unit tests to a btest variable
  broker integration: add events for incoming connection status updates
  broker integration: adapt to change in expiration_time
  Update coverage unit test baselines.
  broker integration: add Comm::enable function
  broker integration: process debug/diagnostic reports from broker
  ...

Conflicts:
	cmake
	testing/btest/Baseline/plugins.hooks/output
2015-03-02 17:10:15 -08:00
Jon Siwek
4dfec04135 broker integration: add Comm::enable function
Works like old enable_communication(), but for new broker communication
mechanism.  Scripts have to explicitly call this if they want to use the
broker communication functionality.  Saves a decent chunk of Bros'
initialization time when one doesn't need communication features.
2015-02-03 16:38:56 -06:00
Jon Siwek
5527543601 broker integration: add unit tests for remote log/print/event 2015-01-26 16:53:13 -06:00
Jon Siwek
1e8d6cd917 broker integration: add API for connecting to peers 2015-01-13 17:14:21 -06:00
Robin Sommer
5ef6dd0e3c Adding call to new binpac::init() function. 2014-10-31 17:44:58 -07:00
Robin Sommer
a98dd29259 Merge remote-tracking branch 'origin/topic/jsiwek/missing-plugin'
* origin/topic/jsiwek/missing-plugin:
  Improve error message when failing to activate a plugin.

BIT-1252 #merged
2014-09-25 10:54:21 -07:00
Jon Siwek
17d60ea8ac Fix file analysis events from coming after bro_done().
BIT-1256 #close
2014-09-18 14:33:20 -05:00
Jon Siwek
d342cde22c Improve error message when failing to activate a plugin.
Also fix a unit test helper script that checks plugin availability.
2014-09-16 10:09:46 -05:00
Jon Siwek
eb16c971c0 Merge remote-tracking branch 'origin/topic/robin/pktsrc'
* origin/topic/robin/pktsrc:
  Fixing link-layer handling.
  Bugfixes and test updates.
  Fixing remaining tests.
  Adding test for dynamic packet dumper plugin.
  Test updates.
  Fixing Bro-level BPF filtering.
  A set of smaller API tweaks, and polishing.
  Adding test creating a dynamic pktsrc plugin.
  Interface tweaks for PktSrc, plus docs for PktSrc and PktDumper.
  A set of various fixes and smaller API tweaks, plus tests.
  Moving some of the BPF filtering code into base class.
  Small packet dumper API change.
  Moving Pkt{Src,Dumper} a directory level up.
  Removing FlowSrc.
  Removing netmap, remaining pieces of the 2ndary path, and left-over files of packet sorter.
  Prototype of a netmap packet source.
  A series of updates and tweaks to the new PktSrc interface.
  Fixing rebase relicts.
  IOSource reorg.

BIT-1243 #close
2014-09-09 12:46:45 -05:00