Commit graph

13262 commits

Author SHA1 Message Date
Bernhard Amann
03f5795095 parse 64-bit consts correctly. 2012-08-28 07:33:05 -07:00
Bernhard Amann
26f5aee7f6 on 32-bit machines only unsigned long longs are 64-bits long. Not just unsigned longs...
Note that this means that up to now all outputs (including logs) of counts > 32 bits were broken on 32-bit systems.
2012-08-28 00:44:39 -07:00
Robin Sommer
20c71cac51 Merge remote-tracking branch 'remotes/origin/topic/bernhard/input-warn-on-invalid-numbers'
* remotes/origin/topic/bernhard/input-warn-on-invalid-numbers:
  ...and another small change to error handling -> now errors in single lines do not kill processing, but simply ignore the line, log it, and continue.
  Ok, this one was a little bit sneaky.
  ok, this one might really be a bit too big for 2.1
2012-08-27 12:43:36 -07:00
Robin Sommer
48c6bdf467 Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  fix handline of sets only containing a zero-length string.

Conflicts:
	src/input/readers/Ascii.cc
2012-08-27 12:27:24 -07:00
Bernhard Amann
56fa56ffa9 ...and another small change to error handling -> now errors in single lines
do not kill processing, but simply ignore the line, log it, and continue.
2012-08-27 11:38:20 -07:00
Bernhard Amann
5c486dae7e Ok, this one was a little bit sneaky.
If I understand things correctly, calling other string functions
on an stl string may alter the contents of the buffer to which
earlier .c_str()-calls pointed. Kind of makes sense when thinking
about it.

Basically moving around a few lines should fix this.

(And thank you again Robin)
2012-08-27 10:54:33 -07:00
Bernhard Amann
a4ca5b0d82 fix handline of sets only containing a zero-length string.
Thank you Robin...
2012-08-27 09:50:51 -07:00
Robin Sommer
352d4bd5e2 Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Ok, this one is not really necessary for 2.1 and more of a nice-to-have
  another small bug found while searching for something else...
  Fix two little bugs:
  sorry. the patch for the set_separator.
  make set_separators different from , work for input framework.
  Bug found bei Keith & Seth: input framework was not handling counts and ints out of 32-bit-range correctly.
2012-08-27 09:31:17 -07:00
Bernhard Amann
f133e8808a ok, this one might really be a bit too big for 2.1
Give all kinds of errors when encountering invalid numbers (like out-of-range-warnings, etc).
2012-08-26 22:00:37 -07:00
Bernhard Amann
7e46936728 Ok, this one is not really necessary for 2.1 and more of a nice-to-have
Before this patch, empty values were not hashed at all. Which had the unfortunate side-effect
that e.g. the lines

TEST	-
and
-	TEST

have the same hash values. On re-reads that means that the change will
be ignored.

This is probably pretty academic, but this patch changes it and adds a testcase.

Output of the reread test changes due to re-ordering of the output (probably
due to the fact that the internal hash values are changed and thus transferred
in a different order)
2012-08-26 20:49:21 -07:00
Bernhard Amann
fbe464ffa3 another small bug found while searching for something else...
...one of the change events got the wrong parameters. This actually is a bit embarassing...
2012-08-26 20:26:08 -07:00
Bernhard Amann
a9e6d9ae81 Fix two little bugs:
Escaped ,'s in sets and vectors were unescaped before tokenization

Handling of zero-length-strings as last element in a set was broken (sets ending with a ,).

Hashing of lines just containing zero-length-strings was broken (now a \0 is appended to each
string before it is hashed - giving us a hash of something for a line just consisting of \0s.
This also allows to differentiate between vectors with varying numbers of zero-length-strings).
2012-08-26 19:17:21 -07:00
Bernhard Amann
6bf733ce51 sorry. the patch for the set_separator. 2012-08-26 17:53:34 -07:00
Bernhard Amann
977c1d7c5a make set_separators different from , work for input framework.
1-line-patch + test.
2012-08-26 17:52:07 -07:00
Bernhard Amann
124c985d7a Bug found bei Keith & Seth: input framework was not handling counts and ints out of 32-bit-range correctly.
Note - another bugfix will be coming later (problem reading sets containing zero-length-strings & un-escaping-bug in sets)
2012-08-26 14:49:37 -07:00
Robin Sommer
b5c6945189 Updating submodule(s).
[nomail]
2012-08-24 15:12:09 -07:00
Robin Sommer
70f1403f14 Updating submodule(s).
[nomail]
2012-08-24 13:19:05 -07:00
Daniel Thayer
90281a2423 Add tests of the Bro scripting language
Added tests of all built-in Bro data types (including different
representations of constant values, and max./min. values), keywords, and
operators (including special properties of certain operators, such as
short-circuit evaluation and associativity).
2012-08-24 11:32:49 -05:00
dina
fb0d93de1e put some make-up on Modbus analyser 2012-08-24 10:21:04 +02:00
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
Soumya Basu
7e07ce3cb1 Basic functionality works. Merging two counters, cloning two counters and iterating over all of the counters still needs work. 2012-08-20 21:57:13 -07: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