Commit graph

3241 commits

Author SHA1 Message Date
Robin Sommer
f830ed3edf s/bro-ids.org/bro.org/g 2013-03-07 19:33:04 -08:00
Robin Sommer
d3bf552a63 Merge remote-tracking branch 'origin/topic/jsiwek/ticket-957'
* origin/topic/jsiwek/ticket-957:
  Fix function type-equivalence requiring same param names, addresses #957

Closes #957.
2013-03-07 13:31:55 -08:00
Robin Sommer
3cd3e26154 Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Fix new[]/delete mismatch in RE.cc reported by jbaines, addresses #958.
  Fix compiler warnings.
2013-03-07 13:28:35 -08:00
Jon Siwek
7e4963b22c Fix new[]/delete mismatch in RE.cc reported by jbaines, addresses #958. 2013-03-07 14:44:01 -06:00
Jon Siwek
f4d59f8137 Fix compiler warnings. 2013-03-07 14:41:18 -06:00
Jon Siwek
2293443ea0 Fix function type-equivalence requiring same param names, addresses #957 2013-03-07 13:02:33 -06:00
Robin Sommer
8ee4382721 Updating submodule(s).
[nomail]
2013-03-06 18:32:43 -08:00
Robin Sommer
a4e40bb402 Merge remote-tracking branch 'origin/topic/bernhard/vector-assignment'
Closes #956.

* origin/topic/bernhard/vector-assignment:
  change vector assignment operator and remove unnecessary argument (expr)
2013-03-06 16:50:53 -08:00
Robin Sommer
8a6d68e00f Merge remote-tracking branch 'origin/topic/bernhard/remove-length'
Closes #955.

* origin/topic/bernhard/remove-length:
  forgot to remove the baselines for the now unnecessary bifs
  remove the byte_len and length bifs
2013-03-06 16:46:20 -08:00
Robin Sommer
1bd2f26df3 Merge remote-tracking branch 'origin/topic/seth/notice-framework-updates'
So much nicer!

Closes #954.

* origin/topic/seth/notice-framework-updates:
  Update notice framework documentation to represent the new reality.
  Complete removal of the old table based notice policy mechanism.
  Updates for the notices framework.
2013-03-06 16:45:30 -08:00
Robin Sommer
9f99a4a942 Merge remote-tracking branch 'origin/topic/jsiwek/local-container-init'
Closes #952.

* origin/topic/jsiwek/local-container-init:
  Fix init of local sets/vectors via curly brace initializer lists.
2013-03-06 15:11:10 -08:00
Robin Sommer
d931079021 Merge remote-tracking branch 'origin/topic/jsiwek/ticket946'
Closes #946.

* origin/topic/jsiwek/ticket946:
  Fix memory leaks resulting from 'when' and 'return when' statements.
  Fix three bugs with 'when' and 'return when' statements. Addresses #946
2013-03-06 15:09:24 -08:00
Robin Sommer
a15b630cac Merge remote-tracking branch 'origin/topic/jsiwek/gtp-enhancements'
* origin/topic/jsiwek/gtp-enhancements:
  Add parsing for GTPv1 extension headers and control messages.
2013-03-06 15:00:45 -08:00
Robin Sommer
c13eae3253 Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Fix possible null pointer dereference in identify_data BIF.
  Fix build on OpenBSD 5.2.
2013-03-06 14:54:50 -08:00
Bernhard Amann
a005d77369 forgot to remove the baselines for the now unnecessary bifs 2013-03-06 14:14:55 -08:00
Bernhard Amann
8f259f866d change vector assignment operator and remove unnecessary argument (expr) 2013-03-06 14:08:06 -08:00
Bernhard Amann
986b346e3f remove the byte_len and length bifs 2013-03-06 13:45:42 -08:00
Seth Hall
e56a33b6c5 Update notice framework documentation to represent the new reality. 2013-03-06 10:04:50 -05:00
Seth Hall
00eeadf2f5 Complete removal of the old table based notice policy mechanism. 2013-03-06 09:44:25 -05:00
Jon Siwek
c88babf6ef Fix init of local sets/vectors via curly brace initializer lists. 2013-03-01 16:42:16 -06:00
Jon Siwek
2481f9f837 Fix possible null pointer dereference in identify_data BIF.
There was no check/handling for if magic_buffer() returns null.
Also centralized libmagic calls for consistent error handling/output.
2013-02-27 16:04:36 -06:00
Jon Siwek
dd9f361bc7 Fix build on OpenBSD 5.2. 2013-02-22 10:45:22 -06:00
Jon Siwek
d158c7ffdf Fix memory leaks resulting from 'when' and 'return when' statements.
Addresses #946.
2013-02-19 16:19:16 -06:00
Jon Siwek
7e5115460c Fix three bugs with 'when' and 'return when' statements. Addresses #946
- 'when' statements were problematic when used in a function/event/hook
  that had local variables with an assigned function value.  This was
  because 'when' blocks operate on a clone of the frame and the cloning
  process serializes locals and the serialization of functions had an
  infinite cycle in it (ID -> BroFunc -> ID -> BroFunc ...).  The ID
  was only used for the function name and type information, so
  refactoring Func and subclasses to depend on those two things instead
  fixes the issue.

- 'return when' blocks, specifically, didn't work whenever execution
  of the containing function's body does another function call before
  reaching the 'return when' block, because of an assertion.  This was
  was due to logic in CallExpr::Eval always clearing the CallExpr
  associated with the Frame after doing the call, instead of restoring
  any previous CallExpr, which the code in Trigger::Eval expected to
  have available.

- An assert could be reached when the condition of a 'when' statement
  depended on checking the value of global state variables.  The assert
  in Trigger::QueueTrigger that checks that the Trigger isn't disabled
  would get hit because Trigger::Eval/Timeout disable themselves after
  running, but don't unregister themselves from the NotifierRegistry,
  which keeps calling QueueTrigger for every state access of the global.
2013-02-19 11:38:17 -06:00
Seth Hall
9f8ba408ba Updates for the notices framework.
- Moved the Notice::notice event and Notice::policy table to both be hooks.

 - Renamed the old Notice::policy to Notice::policy_table and documented it as deprecated.
2013-02-11 14:36:14 -05:00
Jon Siwek
26bf99c5a3 Add parsing for GTPv1 extension headers and control messages.
Added a generic gtpv1_message event generated for any GTP message type.

Added specific events for the create/update/delete PDP context
request/response messages.

Addresses #934.
2013-02-07 14:59:02 -06:00
Seth Hall
a2556642e6 Merge remote-tracking branch 'origin/topic/matthias/notary'
* origin/topic/matthias/notary:
  Small cosmetic changes.
  Give log buffer the correct name.
  Simplify delayed logging of SSL records.
  Implement delay-token style SSL logging.
  More style tweaks: replace spaces with tabs.
  Factor notary code into separte file.
  Adhere to Bro coding style guidelines.
  Enhance ssl.log with information from notary.

Closes #928
2013-02-05 02:06:33 -05:00
Robin Sommer
10d91fd1eb Merge remote-tracking branch 'origin/topic/bernhard/input-tests-exit-after-terminate'
* origin/topic/bernhard/input-tests-exit-after-terminate:
  update input tests to use exit_only_after_terminate
2013-02-04 09:46:01 -08:00
Robin Sommer
52f52f60a5 Merge branch 'topic/robin/exit-after-terminate'
* topic/robin/exit-after-terminate:
  Updating submodule(s).
  Fixing exit-after-terminate when used with bare mode.
  New option exit_only_after_terminate to prevent Bro from exiting.
2013-02-04 09:44:33 -08:00
Bernhard Amann
dd24d7af83 update input tests to use exit_only_after_terminate 2013-02-01 15:45:21 -08:00
Bernhard Amann
d4289b3313 Merge remote-tracking branch 'origin/topic/robin/exit-after-terminate' into topic/bernhard/input-tests-exit-after-terminate 2013-02-01 15:14:49 -08:00
Robin Sommer
d3814594ff Updating submodule(s).
[nomail]
2013-02-01 08:03:18 -08:00
Robin Sommer
01c2bf4e0e Updating submodule(s).
[nomail]
2013-01-30 20:10:36 -08:00
Robin Sommer
b08bdbce46 Updating submodule(s).
[nomail]
2013-01-30 20:09:19 -08:00
Robin Sommer
8c807d19c3 Fixing exit-after-terminate when used with bare mode. 2013-01-30 20:08:36 -08:00
Bernhard Amann
e80d28c9ef Merge branch 'topic/robin/exit-after-terminate' into topic/bernhard/input-tests-exit-after-terminate 2013-01-30 16:34:37 -08:00
Robin Sommer
f6c8995fd2 Merge remote-tracking branch 'origin/topic/jsiwek/record-coerce-orphans'
* origin/topic/jsiwek/record-coerce-orphans:
  Add an error for record coercions that would orphan a field.

Closes #936.
2013-01-25 13:53:12 -08:00
Robin Sommer
b9518f4329 Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Fix runaway reference counting bug in record coercion.
  Fix memory leak in some reporter messaging cases.
2013-01-25 13:51:16 -08:00
Jon Siwek
7d3b20d4fb Fix runaway reference counting bug in record coercion.
The RecordVal ctor refs the type arg via the MutableVal -> Val ctors,
so this line was double incrementing the type's ref count, but could
only decrement it once upon the Val's destruction.
2013-01-25 11:57:21 -06:00
Jon Siwek
b72fbaf99f Fix memory leak in some reporter messaging cases.
Related to the changes in fdd11428.
2013-01-24 10:26:54 -06:00
Jon Siwek
69afc4a882 Add an error for record coercions that would orphan a field.
These cases should be avoidable by fixing scripts where they occur and
they can also help catch typos that would lead to unintentional runtime
behavior.

Adding this already revealed several scripts where a field in an inlined
record was never removed after a code refactor.
2013-01-24 09:56:19 -06:00
Robin Sommer
ed165f22a2 Making a test portable. 2013-01-23 19:43:52 -08:00
Robin Sommer
b6c71f5390 Updating submodule(s).
[nomail]
2013-01-23 18:11:49 -08:00
Robin Sommer
762c034ec2 Merge remote-tracking branch 'origin/topic/bernhard/input-logging-commmon-functions'
* origin/topic/bernhard/input-logging-commmon-functions:
  add the last of Robins suggestions (separate info-struct for constructors).
  port memory leak fix from master
  harmonize function naming
  move AsciiInputOutput over to threading
  and thinking about it, ascii-io doesn't need the separator
  change constructors
  and factor stuff out the input framework too.
  factor out ascii input/output.
  std::string accessors to escape_sequence functionality
  intermediate commit - it has been over a month since I touched this...

I cleaned up the AsciiInputOutput class somewhat, including renaming
it to AsciiFormatter, renaming some of its methods, and turning the
static methods into members for consistency.

Closes #929.
2013-01-23 16:51:54 -08:00
Robin Sommer
c780bfdb48 Merge remote-tracking branch 'origin/topic/jsiwek/ticket-932'
* origin/topic/jsiwek/ticket-932:
  Fix uninitialized locals in event/hook handlers from having a value.

Closes #932.
2013-01-23 15:17:55 -08:00
Robin Sommer
854891930d Merge remote-tracking branch 'origin/topic/jsiwek/ticket-930'
* origin/topic/jsiwek/ticket-930:
  Add a null value check in CompositeHash::ComputeHash.
  Change reporter messages to more reliably print to stderr.

Closes #930.
2013-01-23 14:48:25 -08:00
Robin Sommer
0541c49a50 Changing btest call to use "-j" instead of "-j 5". 2013-01-23 14:44:10 -08:00
Robin Sommer
c9412c4271 Updating submodule(s).
[nomail]
2013-01-23 14:43:12 -08:00
Robin Sommer
dcd675280e Merge remote-tracking branch 'origin/topic/jsiwek/no-switch-fallthrough'
* origin/topic/jsiwek/no-switch-fallthrough:
  Add "fallthrough" keyword, require a flow statement to end case blocks.
  Disable automatic case fallthrough in switch stmts.  Addresses #754.

I've added a test for the error case where no break/fallthrough/return
is given.

Closes #754.
2013-01-23 14:41:23 -08:00
Robin Sommer
4f39470c1b New option exit_only_after_terminate to prevent Bro from exiting.
If set, the main loop won't terminate before somebody calls
terminate().

This should make input framework testing more reliable I'd hope.
2013-01-18 17:34:33 -08:00