Commit graph

11634 commits

Author SHA1 Message Date
Seth Hall
69030fdff3 Merge remote-tracking branch 'origin/master' into topic/seth/metrics-merge 2012-12-17 10:00:34 -05:00
Jon Siwek
81ae68be16 Fix a case where c$resp$size is misrepresented. Addresses #730.
That field is based on TCP sequence numbers and on seeing a SYN followed
by a failed RST injection response, the initial sequence number tracked
the value in the injection (most likely zero) instead of value in
subsequent SYN response.  This could make c$resp$size be set to large
values when it's not really.

Also removed some dead code paths.
2012-12-14 17:08:50 -06:00
Robin Sommer
ea6b62f586 Merge remote-tracking branch 'origin/topic/jsiwek/const'
* origin/topic/jsiwek/const:
  Make const variables actually constant.  Addresses #922.

Closes #922.
2012-12-14 14:56:37 -08:00
Robin Sommer
7a2901ec6b Fixing checksums in test trace because Bro now reports them. :-) 2012-12-14 14:48:16 -08:00
Robin Sommer
e4353fb96b Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Fix memory leak in ascii input reader.
  Improvements for the "bad checksums" detector to make it detect bad TCP checksums.
  Improved file name extraction for SMTP when file name is included in Content-Type header.

Small tweak to "bad checksum" script to avoid potential division by
zeros.
2012-12-14 14:34:51 -08:00
Matthias Vallentin
69d8d29fbd Add new unit test for opaque serialization.
One Bro begins a computation, another finishes it.

(This commit also fixes a problem with the serialization OpaqueVals.)
2012-12-14 13:05:31 -08:00
Matthias Vallentin
b9d05f56d0 Migrate entropy testing to opaque. 2012-12-13 19:28:19 -08:00
Matthias Vallentin
86faab1e06 C++ify RandTest.*
Specifically:

  - Move implementation details into *.cc.

  - Const correctness: do not require superfluous cast.

  - Style: asterisk "binds" to type, not name.
2012-12-13 18:58:23 -08:00
Matthias Vallentin
483cc6bd9e Fix a hard-to-spot bug. 2012-12-13 17:51:42 -08:00
Jon Siwek
290c2a0b4d Make const variables actually constant. Addresses #922.
Both local and global variables declared with "const" could be modified,
but now expressions that would modify them should generate an error
message at parse-time.
2012-12-13 15:05:29 -06:00
Bernhard Amann
f03a8cae04 harmonize function naming 2012-12-13 11:59:59 -08:00
Bernhard Amann
35ac787cd8 move AsciiInputOutput over to threading 2012-12-13 11:53:18 -08:00
Bernhard Amann
524e15f2c5 Fix memory leak in ascii input reader.
In case an error was encountered while parsing an element, that
element itself was not deleted, but remained in memory indefenitely.
2012-12-13 11:41:13 -08:00
Bernhard Amann
12753f31ae Merge remote-tracking branch 'origin/master' into topic/bernhard/input-logging-commmon-functions 2012-12-13 11:22:58 -08:00
Matthias Vallentin
3ba85567f4 Merge branch 'master' into topic/matthias/opaque
Conflicts:
	aux/broctl
2012-12-13 11:03:17 -08:00
Seth Hall
3c27267223 Improvements for the "bad checksums" detector to make it detect bad TCP checksums. 2012-12-13 11:09:41 -05:00
Seth Hall
0cf98ac325 Improved file name extraction for SMTP when file name is included in Content-Type header. 2012-12-13 10:27:08 -05:00
Matthias Vallentin
09aa14d037 Use more descriptive error message. 2012-12-12 15:13:28 -08:00
Matthias Vallentin
c3428ea491 Fix the fix :-/. 2012-12-12 15:12:25 -08:00
Matthias Vallentin
8454f69203 Fix initialization of hash values. 2012-12-12 15:04:12 -08:00
Matthias Vallentin
652a015522 Be clearer about delegation.
Bro uses the Do* prefix to signify the implementation of an aspect. This commit
adopts the opaque values to use this pattern.
2012-12-12 14:54:07 -08:00
Matthias Vallentin
238cffaac4 Implement serialization of opaque types.
This means that, conceptually, incremental hash computations now can start at
one node and finish at another one.
2012-12-12 14:44:28 -08:00
Robin Sommer
6603b851fe Updating submodule(s).
[nomail]
2012-12-12 14:29:10 -08:00
Robin Sommer
3438a8d8f9 Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Trick for parallelizing input framework unit tests.
  Maybe fix reliability of a unit test that relies on when statements.
  Remove unused attributes
2012-12-12 14:26:45 -08:00
Jon Siwek
f6d5da423c Fix record constructors in table initializer indices. Addresses #660.
For an index expression list, ListExpr::InitVal() passed the TypeList
to Expr::InitVal() for each expression element in the list instead of
the type for that element.  This made RecordConstructorExpr::InitVal()
complain since it expects a RecordType and not a TypeList with a
RecordType element as an argument.  In most other cases, Expr::InitVal()
worked because check_and_promote() "flattens" the list to a single type.
2012-12-12 14:52:08 -06:00
Matthias Vallentin
97e3ea1efe Update hash BiF documentation. 2012-12-12 10:39:48 -08:00
Matthias Vallentin
ddd306f00f Migrate free SHA* functions to SHA*Val::digest(). 2012-12-12 10:28:56 -08:00
Matthias Vallentin
91f2cb2b64 Add missing type name that caused failing tests. 2012-12-11 16:49:33 -08:00
Matthias Vallentin
816965f3c7 Merge remote-tracking branch 'origin/master' into topic/matthias/opaque 2012-12-11 16:32:01 -08:00
Matthias Vallentin
30bab14dbf Update base scripts and unit tests. 2012-12-11 16:26:17 -08:00
Matthias Vallentin
833a559cac Simplify hash function BiFs. 2012-12-11 16:25:56 -08:00
Matthias Vallentin
624003f036 Add support for opaque hash values. 2012-12-11 16:25:11 -08:00
Jon Siwek
43ed437daa Trick for parallelizing input framework unit tests.
Instead of loading listen.bro to block until files are read, just read
a pcap file in pseudo-realtime.  Seems to work well.
2012-12-11 17:06:54 -06:00
Jon Siwek
aff5898442 Maybe fix reliability of a unit test that relies on when statements. 2012-12-11 16:26:01 -06:00
Jon Siwek
4c278ce387 Merge branch 'master' into fastpath 2012-12-11 16:21:23 -06:00
Matthias Vallentin
23ca1c90ef Adapt BiF & Bro parser to handle opaque types. 2012-12-10 18:29:06 -08:00
Robin Sommer
b867333c2e Merge remote-tracking branch 'origin/topic/jsiwek/gtp'
* origin/topic/jsiwek/gtp:
  Change binpac exceptions in AYIYA/GTP analyzers to do protocol_violation
  Add GTP tunnel analyzer memory leak unit test.
  Add GPRS Tunnelling Protocol (GTPv1) decapsulation.

Closes #690.
2012-12-10 14:48:18 -08:00
Daniel Thayer
cb7fd7c87c Remove unused attributes
Removed attributes &postprocessor and &match from documentation
and source code.  Removed undocumented attribute &attr from
source code.  Removed internal attribute (&tracked) from documentation.
2012-12-10 15:43:13 -06:00
Robin Sommer
e8482fef99 Updating CHANGES and VERSION. 2012-12-08 12:05:32 -08:00
Matthias Vallentin
622190b4ef More lexer/parser work. 2012-12-07 22:37:59 -10:00
Robin Sommer
e2d20cb7bc Changing the HTTP parser to accept methods that align with the RFC. 2012-12-07 19:42:03 -08:00
Robin Sommer
5598e1ca9b Updating submodule(s).
[nomail]
2012-12-06 15:52:36 -08:00
Robin Sommer
a31161ef26 Updating submodule(s).
[nomail]
2012-12-06 08:34:46 -08:00
Seth Hall
dda36672ac Merge remote-tracking branch 'origin/master' into topic/seth/metrics-merge 2012-12-06 11:07:35 -05:00
Matthias Vallentin
2494940d95 Implement equivalence relation for opaque types. 2012-12-05 18:52:52 -10:00
Robin Sommer
57510464a1 Adapting the HTTP request line parsing to only accept methods
consisting of letters [A-Za-z].

I had some bogus HTTP sessions now with the test-suite that reported
data as HTTP because it started with "<!... ". Requiring letters seems
a reasonable constraint.
2012-12-05 16:56:54 -08:00
Robin Sommer
c8d264f105 Updating submodule(s).
[nomail]
2012-12-05 15:50:46 -08:00
Robin Sommer
90fc5c97e5 Reporting warnings if kill/waitpid fail in communication system. Also
replace bzero with memset(). Patches from Bill Parker.
2012-12-05 15:50:15 -08:00
Daniel Thayer
8c73e83c55 More updates to built-in types document 2012-12-05 17:34:31 -06:00
Robin Sommer
177c014cb7 Merge remote-tracking branch 'vlad/topic/vladg/http-verbs'
* vlad/topic/vladg/http-verbs:
  A test for HTTP methods, including some horribly illegal requests.
  Remove hardcoded HTTP verbs from the analyzer (#741)

I added a "bad_HTTP_request" weird for HTTP request lines that don't
have more than a single word.

Closes #741.
2012-12-05 15:27:42 -08:00