Commit graph

7932 commits

Author SHA1 Message Date
Vern Paxson
4afc1d01ec Merge branch 'topic/vern/pattern-ops' of github.com:bro/bro into topic/vern/pattern-ops
Conflicts:
	src/Expr.cc
	src/parse.y
2018-06-22 14:49:24 -07:00
Chung Min Kim
4cdf1e39bb Add code coverage for bro source files after btest test suite
Adds --enable-coverage flag to configure Bro with gcov.
A new directory named /testing/bro-code-coverage/ contains a new
coverage target that as part of `make coverage` in /testing/.
This coverage option creates coverage.log of all important directories in /src/ and
places all generated .gcov files alongside the corresponding source file.
2018-06-22 14:27:46 -07:00
Vern Paxson
9e2c70b90b deprecate merge_patterns() 2018-06-22 14:17:15 -07:00
Vern Paxson
89b7b88e75 deprecate boolean scalar+vector operations 2018-06-22 13:43:51 -07:00
Vern Paxson
b811a8e7a6 bug fix (and typo fix) for vector+scalar boolean operations 2018-06-22 13:40:53 -07:00
Johanna Amann
948bb4b9ec Merge remote-tracking branch 'origin/master' into topic/johanna/config-cluster 2018-06-22 10:43:09 -07:00
Vern Paxson
cff68b4371 deprecate mixing scalars and vectors 2018-06-22 10:03:13 -07:00
Daniel Thayer
ed42e20714 Use docker containers to run Bro tests on Travis CI
The advantage of using docker containers is to build and test Bro in
an environment that more closely resembles the environment where Bro
will actually be used.  The docker containers currently used enable
testing Bro with all the major versions of gcc (versions 4 through 8),
as well as both python 2 and 3.

The "travis-job" script now takes a second parameter which specifies
a Linux distro to use (specifying "travis" will build and test bro
without using docker).
2018-06-22 10:36:49 -05:00
Daniel Thayer
3767d2bee2 Travis CI fewer failures and improved output messages
Improved readability of the output by adding more error checking
and better error and informational messages, and by moving the
unit test diag.log output to just before any external tests are run.

For pull request builds, skip the private tests instead of failing.

Prevent timeouts after 10 minutes of no output by not using the
btest "-b" option.

Decrease build time by not building unneeded components.
2018-06-22 01:01:40 -05:00
Vern Paxson
6c8562bbdd deprecate && / || operators for patterns 2018-06-21 15:50:56 -07:00
Vern Paxson
b864772e8a fixed typos in NEWS 2018-06-21 15:15:05 -07:00
Johanna Amann
2470954795 Fix for ancient reference-counting bug in NFA.cc
This patch fixes a *19 year old* reference-counting bug (which could
lead to a use-after-free, not merely a leak) in the regular expression
code.

Patch by Vern Paxson.
2018-06-21 14:21:36 -07:00
Jon Siwek
e5275b0c92 Merge branch 'topic/vern/bit-ops' of https://github.com/bro/bro
* 'topic/vern/bit-ops' of https://github.com/bro/bro:
  documentation clarification for "p1 | p2"
  documentation for bitwise operators
  document the '|' operator for patterns
  test suite for bitwise operators brief NEWS blurb allow for "counter" operands (does anyone still use these?) for one (but not both) of the bitwise operands
  bitwise operations for "count" types implemented
  Starting branch for supporting bit operations on count's.
2018-06-21 16:05:07 -05:00
Jon Siwek
0ab550d3b1 Updating submodule(s).
[nomail]
2018-06-21 14:36:42 -05:00
Jon Siwek
8ee92c70da Add ability for BroControl to skip cluster setup
It does this by setting the BROCTL_CHECK_CONFIG env. variable.
Related to BIT-1938.
2018-06-21 11:57:18 -05:00
Jon Siwek
66ee376411 BIT-1938: fix crash in Broker manager shutdown 2018-06-21 11:48:10 -05:00
Johanna Amann
a00298c2d1 Merge remote-tracking branch 'origin/topic/jsiwek/config-cluster' into topic/johanna/config-cluster
* origin/topic/jsiwek/config-cluster:
  Teach Option::set to unwrap Broker::Data values
  Support unserializing broker data into type 'any'
  Fix a bug in broker data type-casting check
  Remove dead code in broker data/val conversion function
2018-06-20 15:00:15 -07:00
Vern Paxson
21614cd30d basic code implemented, but there's a memory problem somehwere :-( 2018-06-20 09:49:29 -07:00
Daniel Thayer
7b3bad635b Disable broxygen when running unit tests
Disable broxygen when running unit tests (except for the tests that use
broxygen).  On my dual-core MacBook Pro, this change results in the
unit tests taking about 13% less time to finish running.
2018-06-19 16:30:40 -05:00
Vern Paxson
344382ee7b documentation clarification for "p1 | p2" 2018-06-19 11:50:38 -07:00
Jon Siwek
c11039cb73 Make old comm. system usages an error unless old_comm_usage_is_ok is set 2018-06-15 17:15:46 -05:00
Jon Siwek
3c6afc8409 Add --disable-broker-tests configure option 2018-06-15 15:30:32 -05:00
Jon Siwek
bf246e59d0 Updating submodule(s).
[nomail]
2018-06-15 14:57:16 -05:00
Jon Siwek
5ac2cdecd4 Updating submodule(s).
[nomail]
2018-06-14 17:34:38 -05:00
Jon Siwek
32bd0bfb6e Updating submodule(s).
[nomail]
2018-06-14 16:32:01 -05:00
Jon Siwek
e578c1c231 Add Broker::max_threads and Broker::max_sleep tuning options
The former replaces the pcap vs. live versions of the same tuning
option.  If a user does not change these, Bro makes some internal
decisions that may help avoid performance problems on systems with high
core counts: the number of CAF threads is capped at 8 and the maximum
sleep duration for under-utilized threads is increased to 64ms (CAF's
default is 10ms).
2018-06-14 12:57:23 -05:00
Jon Siwek
197ea03f8f Minor optimization to bro_broker::Manager::FlushPendingQueries 2018-06-14 12:41:21 -05:00
Jon Siwek
8a00a2dbf8 Updating submodule(s).
[nomail]
2018-06-13 14:48:28 -05:00
Jon Siwek
c9fe9a943c Add Broker::max_live_threads and Broker::max_pcap_threads tunables
These may be used to change the number of scheduler threads that the
underlying CAF library creates.  In pcap mode, it's currently hardcoded
to the minimal 4 threads due to potentially significant overhead in CAF.
2018-06-12 13:54:43 -05:00
Jon Siwek
6752ffcc8e Updating submodule(s).
[nomail]
2018-06-11 10:39:56 -05:00
Robin Sommer
280e8c7dcc Merge branch 'master' of ssh://git.bro.org/bro 2018-06-08 16:41:28 +00:00
Robin Sommer
554e8cc73d Merge remote-tracking branch 'origin/topic/jsiwek/broker-listen-env'
BIT-1935 #merged

* origin/topic/jsiwek/broker-listen-env:
  Allow BRO_DEFAULT_LISTEN_ADDRESS to control broker listen address
2018-06-08 16:38:31 +00:00
Jon Siwek
b51e6f39dd Correct conn history field documentation 2018-06-08 10:43:32 -05:00
Jon Siwek
8bbe84a1b6 Updating submodule(s).
[nomail]
2018-06-08 10:00:42 -05:00
Jon Siwek
c2c35ed178 Updating submodule(s).
[nomail]
2018-06-07 16:56:14 -05:00
Jon Siwek
da593e7aaa GH-131: disable krb ticket decryption on non-Linux
A test case fails on macOS and FreeBSD fails to build.
2018-06-07 13:58:01 -05:00
Jon Siwek
f50effd364 Fix signed/unsigned comparison compiler warning
The signed int in this case is essentially a constant anyway.
2018-06-07 09:57:55 -05:00
Jon Siwek
9822fc252d Improve Broker performance
Now manually keeps track of peer count instead of querying Broker for
that information (which would result in waiting upon a blocking request
to the core actor).
2018-06-06 16:25:30 -05:00
Jon Siwek
10fdb16f3b Updating submodule(s).
[nomail]
2018-06-06 14:02:22 -05:00
Jon Siwek
0b4871daf4 BIT-1936: improve Broxygen warnings 2018-06-05 17:33:11 -05:00
Jon Siwek
b5b688b5f5 Update make doc: don't copy broker docs 2018-06-05 15:20:49 -05:00
Jon Siwek
a43c7d0691 Merge remote-tracking branch 'origin/topic/jsiwek/ncp-fixes'
* origin/topic/jsiwek/ncp-fixes:
  Add NCP::max_frame_size tuning option
  Migrate NCP analyzer to use latest analyzer API
2018-06-05 11:32:38 -05:00
Johanna Amann
a891517762 Fix read at invalid address in X509 extension parser.
When encountering an extension unknown to OpenSSL, we would read from
the wrong memory location. Also added a testcase to prevent this specific
case from happening again.
2018-06-04 12:05:56 -07:00
Jon Siwek
19b893a5bc Make 0 be a valid packet source timestamp
For fuzzed/damaged/corrupted pcaps, a timestamp of 0 could lead to an
infinite loop in Bro as it interprets that as meaning the packet source
is not ready yet.
2018-06-04 13:56:52 -05:00
Johanna Amann
791b24d232 Merge remote-tracking branch 'origin/topic/jsiwek/broker-misc'
* origin/topic/jsiwek/broker-misc:
  Add Broker::publish_and_relay BIF
  Document variable argument list BIFs using ellipsis
  Support unserializing broker data into type 'any'
  Fix a bug in broker data type-casting check
  Remove dead code in broker data/val conversion function
2018-06-04 10:00:49 -07:00
Johanna Amann
2f250637c1 Merge remote-tracking branch 'origin/topic/vladg/ssh-fix'
* origin/topic/vladg/ssh-fix:
  #120: Pull in PR, and make a couple small cleanup tweaks.
  SSH protocol now assesses the packet length at an earlier stage within binpac. Stops SSH analyzer constantly raising binpac exceptions. Seems to be because a packet continues to go through binpac when empty and only calls the next packet when asked for more data and not on operations.
2018-06-03 08:43:08 -07:00
Vlad Grigorescu
fde88fa717 #120: Pull in PR, and make a couple small cleanup tweaks. 2018-06-02 17:29:01 -05:00
Vlad Grigorescu
7e5788bff0 Merge branch 'topic/andrew/ssh-fix' of https://github.com/Andrew-Woodford/bro into topic/vladg/ssh-fix 2018-06-02 16:26:05 -05:00
Seth Hall
cd18d96205 Removed a few more discovered UTF-8 characters in Bro scripts. 2018-06-02 04:57:48 -04:00
Seth Hall
51f20136d5 Remove some UTF-8 characters that snuck into a few strings. 2018-06-02 04:37:08 -04:00