Commit graph

7780 commits

Author SHA1 Message Date
Daniel Thayer
bd74b4525b Add pattern operators to the documentation of operators 2018-06-27 14:00:56 -05:00
Daniel Thayer
ceefb6edaf Fix minor typos in broker reference documentation 2018-06-27 13:00:09 -05:00
Daniel Thayer
57128af3ab Fix a broken link and some typos in broker documentation 2018-06-26 15:34:57 -05:00
Daniel Thayer
884d3d2abd Fix reST formatting in documentation of "count" type 2018-06-26 14:43:41 -05:00
Daniel Thayer
fef351b9c1 Add documentation for some new Bro features
Add documentation for the type-based "switch" statement,
the "as" operator, the "is" operator, and bitwise operators.
2018-06-26 14:38:24 -05:00
Jon Siwek
9c0303804d Remove header self-inclusions 2018-06-26 11:46:40 -05:00
Daniel Thayer
f57611c2f0 Fix travis-job script to not fail when all tests succeed
Fixed by calling the "showdiag" function only when external tests fail.
2018-06-26 08:30:49 -05:00
Jon Siwek
a33d2d13bf Reorganize private broker/Manager members 2018-06-25 16:41:55 -05:00
Jon Siwek
0200b5bd88 Move internal broker/Manager classes out of header 2018-06-25 16:35:25 -05:00
Jon Siwek
0ae022205e Reduce proliferation of including broker header files
This change should roughly halve compilation time
2018-06-25 16:35:25 -05:00
Jon Siwek
0907921178 Merge remote-tracking branch 'origin/topic/dnthayer/travis-ci-docker'
* origin/topic/dnthayer/travis-ci-docker:
  Use docker containers to run Bro tests on Travis CI
  Travis CI fewer failures and improved output messages
2018-06-25 11:28:28 -05:00
Jon Siwek
e93c638f8d Fix null pointer deref in AST traversal
Specifically in the case where parsing bro scripts had failed.
2018-06-22 20:18:36 -05: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
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
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