Commit graph

3375 commits

Author SHA1 Message Date
Jon Siwek
6fbbf28290 Update compile/dependency docs for OS X. 2012-09-14 10:28:23 -05:00
Jon Siwek
6d1abdb661 Adjusting Mac binary packaging script.
Setting CMAKE_PREFIX_PATH helps link against standard system libs
instead of ones that come from other package manager (e.g. MacPorts).

Changed to allow only more recent CMake versions to create packages
due to poorer clang compiler support in older versions, important
since clang is now the default compiler instead of gcc on Macs.
2012-09-13 16:47:40 -05:00
Jon Siwek
292bf61ae8 Unit test reliability adjustment.
Sometimes manager node was shutting everything down before others had
a chance to generate output.  It now waits for all nodes to fully
connect with each other.
2012-09-13 12:59:40 -05:00
Jon Siwek
bd84ff2c20 Adjusting some unit tests that do cluster communication.
Added explicit synchronization and termination points to make the
tests more reliable and exit earlier in most cases.
2012-09-07 16:25:07 -05:00
Jon Siwek
67d01ab9e9 Small change to non-blocking DNS initialization.
The trailing dot on "localhost." circumvents use of /etc/hosts in
some environments (I saw it on FreeBSD 9.0-RELEASE-p3) and so emits
an actual DNS query.  When running the test suite, that would be
hundreds of useless queries.
2012-09-07 15:15:48 -05:00
Bernhard Amann
f6c9b69eda reorder a few statements in scan.l to make 1.5msecs etc work.
Adresses #872
2012-09-07 10:57:52 -07:00
Daniel Thayer
84fabf1718 Add an item to FAQ page about broctl options 2012-09-07 12:40:25 -05:00
Daniel Thayer
2dca037384 Merge remote-tracking branch 'origin/master' into topic/dnthayer/language-tests 2012-09-07 10:52:21 -05:00
Daniel Thayer
84ec139fd9 Update language tests for recent bug fixes 2012-09-07 10:48:13 -05:00
Robin Sommer
7e3f06fca3 Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Fix the "-=" operator for intervals
  Fix "!=" operator for subnets
  Add sleeps to configuration_update test for better reliability.
  Fix a segfault when iterating over a set
2012-09-06 23:24:13 -07:00
Robin Sommer
11f66076a1 Starting 2.2 release notes. 2012-09-06 23:05:57 -07:00
Daniel Thayer
cd21eb5b6a Fix the "-=" operator for intervals
Fixed a bug where "a -= b" (both operands are intervals) was not allowed in
bro scripts (although "a = a - b" is allowed).
2012-09-05 17:17:43 -05:00
Daniel Thayer
9357aeb6b1 Fix "!=" operator for subnets
Fixed a bug where the "!=" operator with subnet operands
was treated the same as the "==" operator.
2012-09-05 16:52:14 -05:00
Jon Siwek
a10093b620 Add sleeps to configuration_update test for better reliability.
Not the greatest solution, but makes the 3 bro processes more likely to
run sequentially so that the controller2 process doesn't happen to be
scheduled before the controller process.  In that case, the controllee
gets the shutdown request before the configuration update.  FreeBSD
especially seemed to schedule them the unintended way frequently.
2012-09-05 16:20:34 -05:00
Daniel Thayer
63a550fa9e Fix a segfault when iterating over a set
When iterating over a set with a "for" loop, bro would segfault
when the number of index variables was less than required.
Example:  for ( [c1,c2] in s1 ) ...
where s1 is defined as set[addr,port,count].
2012-09-05 12:00:21 -05:00
Daniel Thayer
d5bf5eb38c Add more language tests 2012-09-04 17:39:00 -05:00
Daniel Thayer
76420e4b61 Add more language tests 2012-09-02 12:55:31 -05:00
Daniel Thayer
05ad3f95af Add more language tests
Added more tests and fixed a broken test.
2012-08-31 14:05:02 -05:00
Seth Hall
78401262d0 Merge remote-tracking branch 'origin/master' into topic/seth/intel-framework 2012-08-30 11:36:34 -04:00
Robin Sommer
a48963f82b Merge remote-tracking branch 'origin/master' into topic/robin/modbus-merge
* origin/master:
  Two fixes.
  Updating CHANGES and VERSION.
  Updating CHANGES and VERSION.
  Remove automatic use of gperftools on non-Linux systems.
  Set VERSION to 2.1-rc3 so that we don't get confused.
  Fix uninitialized value for 'is_partial' in TCP analyzer.
  parse 64-bit consts correctly.
  on 32-bit machines only unsigned long longs are 64-bits long. Not just unsigned longs...
2012-08-29 18:01:31 -07:00
Robin Sommer
cbb31cedc3 Merge remote-tracking branch 'origin/topic/dina/modbus' into topic/robin/modbus-merge
* origin/topic/dina/modbus:
  put some make-up on Modbus analyser
  Modbus analyser, added support: FC=20,21
  Modbus analyzer,added support: FC=1,2,15,24
  Modbus analyzer, current support: FC=3,4,5,6,7,16,22,23

I cleaned up the code a bit, mainly layout style.

I did not include the *.bro scripts for now, but a test script
../testing/btest/scripts/base/protocols/modbus/events.bro that prints
out the value for each event.

Merged the Modbus traces from the ics repository into a single trace
as input for the test. They currently trigger 20 of the 34 events.

Addresses #870.
2012-08-29 17:58:41 -07:00
Daniel Thayer
44c6ed5e8c Update language tests
Updated the int and count max/min constant value tests based on latest fixes
in master.
2012-08-29 17:53:37 -05:00
Daniel Thayer
844ecd197e Merge remote-tracking branch 'origin/master' into topic/dnthayer/language-tests 2012-08-29 17:19:55 -05:00
Daniel Thayer
621a90d248 Add more language tests
Added tests for the conditional operator, operator precedence,
modules ("module" and "export" keywords, and the "::" operator), and
for the "copy" keyword.

Also improved tests of max/min values of int, count, and double constants.
2012-08-29 17:14:03 -05:00
Robin Sommer
22cf75dae5 Two fixes.
- Typo in recent scanner fix.

    - Make bif.identify_magic robust against FreeBSD's libmagic config.
2012-08-29 08:11:16 -07:00
Robin Sommer
b915db86d5 Updating CHANGES and VERSION. 2012-08-28 16:47:49 -07:00
Robin Sommer
e4b7ffa8ac Updating CHANGES and VERSION. 2012-08-28 16:44:30 -07:00
Robin Sommer
a24abddc5f Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Remove automatic use of gperftools on non-Linux systems.
  Fix uninitialized value for 'is_partial' in TCP analyzer.
  parse 64-bit consts correctly.
  on 32-bit machines only unsigned long longs are 64-bits long. Not just unsigned longs...
2012-08-28 16:35:06 -07:00
Jon Siwek
cc49193f93 Remove automatic use of gperftools on non-Linux systems.
--enable-perftools must now explicity be supplied to ./configure on
non-Linux systems to link against the tcmalloc library that a
gperftools installation provides.  Linux systems still automatically
link it if it's found.  The rationale is that gperftools was developed
and most throroughly tested on Linux so it's safer there.

There especially seems to be potential problems with gperftools on OS X
(e.g. see http://code.google.com/p/gperftools/issues/detail?id=413),
and Bro currently doesn't work with gpertools there using clang or gcc.
2012-08-28 13:11:12 -05:00
Robin Sommer
393ded1efe Set VERSION to 2.1-rc3 so that we don't get confused. 2012-08-28 09:19:33 -07:00
Jon Siwek
b815b7ca5c Fix uninitialized value for 'is_partial' in TCP analyzer.
This led to non-deterministic behavior in cases where the first packet
analyzed wasn't from the originator side (see the conditionals in
TCP_Analyzer::CheckFlagCombos()).

The 'short' test in private test suite showed this behavior most often.
2012-08-28 10:57:21 -05:00
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