Commit graph

3375 commits

Author SHA1 Message Date
Robin Sommer
6dd43ea017 Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Update documentation for builtin types
  Adding an identifier to the SMTP blocklist notices for duplicate suppression.
  Doc fixes for signature 'eval' conditions.
  Remove orphaned unit tests.
  Add type checking for signature 'eval' condition functions.
2012-08-23 12:00:10 -07:00
Daniel Thayer
c1c9c9e34a Update documentation for builtin types
Add missing description of interval "msec" unit.
Improved description of pattern by clarifying the issue of operand
order and difference between exact and embedded matching.
2012-08-23 13:04:18 -05:00
Seth Hall
58b5109e01 Merge branch 'fastpath' of ssh://git.bro-ids.org/bro into fastpath 2012-08-23 13:55:21 -04:00
Seth Hall
5f40e153a8 Adding an identifier to the SMTP blocklist notices for duplicate suppression.
- Slight addition and revision to inline docs.
2012-08-23 13:55:04 -04:00
Jon Siwek
558ca2867c Doc fixes for signature 'eval' conditions. 2012-08-23 12:29:42 -05:00
Jon Siwek
ff60b0bb4b Remove orphaned unit tests.
Looks like they're maybe from 1.5 and not applicable/updateable.
2012-08-23 11:59:51 -05:00
Jon Siwek
bef0ce1c98 Add type checking for signature 'eval' condition functions.
Otherwise functions could be called with a mismatching argument list
and cause a crash at run-time.  The incorrect function type is now
reported at parse-time.
2012-08-23 11:52:39 -05:00
Robin Sommer
25ef0a89e7 Updating NEWS. 2012-08-22 18:15:55 -07:00
Robin Sommer
95d7055373 Updating submodule(s).
[nomail]
2012-08-22 16:17:27 -07:00
Robin Sommer
42355bf6f1 Merge remote-tracking branch 'origin/topic/bernhard/input-allow_invalid_types'
* origin/topic/bernhard/input-allow_invalid_types:
  to be sure - add a small assertion
  add an option to the input framework that allows the user to chose to not die upon encountering files/functions.

That's the last feature for 2.1!
2012-08-22 16:11:28 -07:00
Robin Sommer
2eff64944b Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Add test serialization to "leak" unit tests that use communication.
  Change to metrics/basic-cluster unit test for reliability.
  Minor tweak to coverage.bare-mode-errors unit test.
  Fixed ack tracking which could overflow quickly in some situations.
2012-08-22 16:06:17 -07:00
Jon Siwek
93744c8d9b Add test serialization to "leak" unit tests that use communication. 2012-08-22 16:54:00 -05:00
Jon Siwek
655a73bc13 Change to metrics/basic-cluster unit test for reliability.
If the metrics break interval happened to occur between first and second
worker starting up and getting connected to the cluster, the test
would fail because the second worker didn't get a chance to connect and
send data.  The test now waits for the cluster setup to complete
before workers send metrics data.
2012-08-22 16:46:47 -05:00
Bernhard Amann
201c4aa43a to be sure - add a small assertion 2012-08-22 13:25:22 -07:00
Jon Siwek
acdce70bcc Merge branch 'fastpath' of git://git.bro-ids.org/bro into fastpath 2012-08-22 11:14:00 -05:00
Jon Siwek
e66e9e5d32 Minor tweak to coverage.bare-mode-errors unit test.
Adding trailing slash to $DIST/scripts makes the `find` work
with a symlinked 'scripts' dir.
2012-08-22 11:12:27 -05:00
Seth Hall
b6bd849018 Fixed ack tracking which could overflow quickly in some situations.
- Problem presented itself through incorrect results in capture-loss.bro
  under odd traffic circumstances (exact circumstances unknown).

- Changed variables involved in ack tracking to all be uint64 values.
2012-08-22 12:12:16 -04:00
Robin Sommer
d877a04c79 Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  single-line documentation addition to main input framework script.
  add testcase for input of set. Sets can be imported by not specifying $val in the add_table call.
2012-08-22 08:45:32 -07:00
dina
c58c6791c5 Modbus analyser, added support: FC=20,21 2012-08-22 16:47:34 +02:00
Bernhard Amann
1498a3bd59 Merge remote-tracking branch 'origin/master' into topic/bernhard/input-allow_invalid_types 2012-08-22 07:30:58 -07:00
Bernhard Amann
e754590046 Merge remote-tracking branch 'origin/fastpath' into fastpath 2012-08-22 07:28:23 -07:00
Bernhard Amann
b53be21750 add an option to the input framework that allows the user
to chose to not die upon encountering files/functions.

I am not entirely sure if I like the approach I took for
this, it is a bit... hacky.
2012-08-22 06:46:45 -07:00
Bernhard Amann
ec224ada06 single-line documentation addition to main input framework script. 2012-08-21 22:17:28 -07:00
Bernhard Amann
cd67603f49 add testcase for input of set.
Sets can be imported by not specifying $val in the add_table call.

This actually was already implemented, I just completely forgot about it.
2012-08-21 21:48:49 -07:00
Robin Sommer
0c70711841 Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Tweak to rotate-custom.bro unit test.
  Ignore small mem leak every rotation interval for dataseries logs.
2012-08-21 15:46:42 -07:00
Jon Siwek
bb4b68946f Tweak to rotate-custom.bro unit test.
This one would fail intermittently in the cases where log files were
opened or closed on a different second of the time of day from each
other since the "out" baseline contains only a single "#open" and
"#close" tag (indicating all logs opened/closed on same second of time
of day).  Piping aggregated log output through the timestamp canonifier
before `uniq` makes it so "#open" and "#close" tags for different
seconds of the time of day are reduced to a single one.
2012-08-21 15:22:54 -05:00
Jon Siwek
06b7379bc3 Ignore small mem leak every rotation interval for dataseries logs.
Not sure if more can be done to work around it, but reported to
dataseries devs here: https://github.com/dataseries/DataSeries/issues/1

The core/leaks/dataseries-rotate.bro unit test fails without this.
2012-08-21 14:54:57 -05:00
Robin Sommer
434d6a84d8 Linking ES docs into logging document. 2012-08-21 08:42:09 -07:00
dina
e8f4c7bc3d Modbus analyzer,added support: FC=1,2,15,24 2012-08-21 15:39:52 +02:00
Robin Sommer
0f663ca813 Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Add the Stream record to Log:active_streams to make more dynamic logging possible.
  Fix portability of printing to files returned by open("/dev/stderr").
  Fix mime type diff canonifier to also skip mime_desc columns
  Unit test tweaks/fixes.
  Fix memory leak of serialized IDs when compiled with --enable-debug.

One tweak to the open() change: make sure we don't try to rotate the
special files.
2012-08-20 20:08:30 -07:00
Seth Hall
0dbf2f18fa Add the Stream record to Log:active_streams to make more dynamic logging possible. 2012-08-20 13:26:17 -04:00
dina
5c756dcebf Modbus analyzer, current support: FC=3,4,5,6,7,16,22,23 2012-08-20 13:30:22 +02:00
Jon Siwek
f201a9f1a7 Fix portability of printing to files returned by open("/dev/stderr").
The BroFile ctor now wraps /dev/std{in,out,err} string arguments
into the actual FILE* provided by stdio.h because use of the former
directly isn't POSIX compliant and led to subtle differences that
broke unit tests on certain platforms (e.g. OS X redirection of stderr
behavior started differing from Linux).  The BroFile (un)serialization
methods already did this kind of logic, so adding it in the ctor also
should make things more consistent.

Some of the reporter-related unit tests looked like they were missing
output because of this, and the coverage test for bare-mode errors
needed tweaking to branch on whether or not libcurl was available
(since the error output differs when elasticsearch isn't there).
2012-08-17 17:27:02 -05:00
Jon Siwek
907c92e1cc Fix mime type diff canonifier to also skip mime_desc columns
In particular, the ftp.log baseline in the new ipv6 test in bro-testing
was failign on various platforms because of this.
2012-08-17 15:22:51 -05:00
Jon Siwek
508ac1c7ba Unit test tweaks/fixes.
- Some baselines for tests in "leaks" group were outdated.

- Changed a few of the cluster/communication tests to terminate
  more explicitly instead of relying on btest-bg-wait to kill
  processes.  This makes the tests finish faster in the success case
  and makes the reason for failing clearer in the that case.
2012-08-16 16:33:46 -05:00
Jon Siwek
a6f7fd9c87 Fix memory leak of serialized IDs when compiled with --enable-debug.
When using --enable-debug, values keep track of the last identifier
to which they were bound by storing a ref'd ID pointer.  This could
lead to some circular dependencies in which an ID is never reclaimed
because the Val is bound to the ID and the ID is bound to the Val, with
both holding references to each other.

There might be more cases where this feature of --enable-debug caused
a leak, but it showed up in particular when running the
core.leaks.remote unit test due to the internal
SendID("peer_description") call during the handshake between remote
processes.  Other tests showed the send_id() BIF leaked more generally.

Tracking the ID last bound to a Val through just the identifier string
instead of a ref'd ID pointer fixes the leak.
2012-08-16 15:59:26 -05:00
Robin Sommer
4da209d3b1 Installing a handler for running out of memory in "new".
Bro will now print an error message in that case rather than abort
with an uncaught exception.
2012-08-16 11:49:51 -07:00
Robin Sommer
4c3be63919 Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Fixed more potential problems with deadlocked ES threads and signals from libcurl.
  Fix some problems in logs-to-elasticsearch.bro
2012-08-16 11:44:16 -07:00
Seth Hall
b13196cbf1 Fixed more potential problems with deadlocked ES threads and signals from libcurl. 2012-08-16 09:24:25 -04:00
Seth Hall
fe84e7aaf8 Merge remote-tracking branch 'origin/master' into fastpath 2012-08-16 09:17:14 -04:00
Seth Hall
205ad78369 Fix some problems in logs-to-elasticsearch.bro 2012-08-14 15:09:38 -04:00
Robin Sommer
eee4fbf7ad Updating submodule(s).
[nomail]
2012-08-10 13:33:57 -07:00
Robin Sommer
d1c78d0300 Updating baselines. 2012-08-10 13:25:18 -07:00
Robin Sommer
38912c182c Updating submodule(s).
[nomail]
2012-08-10 12:33:45 -07:00
Robin Sommer
9cea1d3b27 Merge remote-tracking branch 'origin/topic/seth/reporter-to-stderr'
* origin/topic/seth/reporter-to-stderr:
  A couple of tests for printing reporter messages to STDERR.
  Small improvements for printing reporter messages to STDERR.
  Reporter warnings and error now print to stderr by default.

Closes #836.
2012-08-10 12:29:07 -07:00
Robin Sommer
2e936c7570 Merge remote-tracking branch 'origin/topic/dnthayer/more-bif-tests'
* origin/topic/dnthayer/more-bif-tests:
  Add more BIF tests
  Add tests for untested BIFs

Closes #863,
2012-08-10 12:24:53 -07:00
Robin Sommer
879b7dd6c5 Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  fix little sneaky bug in input framework with an edge case.
  small bug in test script. Still worked, because the internal type checking let this through...
2012-08-10 12:23:32 -07:00
Seth Hall
cfe1402281 A couple of tests for printing reporter messages to STDERR. 2012-08-09 14:48:46 -04:00
Seth Hall
7c6b891b63 Small improvements for printing reporter messages to STDERR. 2012-08-09 13:46:58 -04:00
Daniel Thayer
bda8631f32 Add more BIF tests 2012-08-07 14:10:55 -05:00