Commit graph

363 commits

Author SHA1 Message Date
Robin Sommer
03ffce66fe Merge branch 'master' of ssh://git.bro-ids.org/bro 2011-09-25 14:15:52 -07:00
Seth Hall
827dcea586 Updating some test baselines.
- I see 5 broken tests currently.
2011-09-25 08:09:37 -04:00
Robin Sommer
d289db34db Communication fix and extension.
- Removing unnecessary log flushing. Closes #498.

- Adding new BiF disconnect() that shuts a connection to a peer down.

- terminate_connection() now first flushes any still buffered log
  messages.
2011-09-24 21:23:25 -07:00
Robin Sommer
a2edff9385 Updating baselines. 2011-09-22 19:52:11 -07:00
Robin Sommer
c9b9bab473 Merge remote-tracking branch 'origin/topic/seth/notice-suppression'
* origin/topic/seth/notice-suppression:
  Updated a notice related baseline and added a necessary @load line.
  Notice suppression clean up and notice/cluster integrtion fixes.
  Updates for notice suppression to use the &create_expire attribute
  Small, mostly cosmetic updates and fixing a test.
  Fix crash on exit (addresses #607).
  Duplicate notice suppression.

Closes #623.
2011-09-22 19:20:34 -07:00
Jon Siwek
d2118200ea Fixing unit tests and some minor bugs. 2011-09-22 12:42:16 -05:00
Seth Hall
d18fdef2d4 Merge remote-tracking branch 'origin/master' into topic/seth/notice-suppression 2011-09-21 02:26:19 -04:00
Seth Hall
664500226e Updated a notice related baseline and added a necessary @load line. 2011-09-20 12:19:22 -04:00
Seth Hall
412cdb16a0 Notice suppression clean up and notice/cluster integrtion fixes.
- Worker raised notices are printed a single time by the manager now.

- Cluster/notices integration cleaned up.

- New tests for cluster/notice integration.

- Notice suppression fixes and tests.
2011-09-19 12:05:13 -04:00
Seth Hall
acbfb6a425 Updates for notice suppression to use the &create_expire attribute
- The table tracking notice suppressions is now done with a table
  attribute instead of "manually" with scheduled events.

- The $suppress_for field can be set within PolicyItem's now too to
  affect the suppression interval through the notice policy.
2011-09-19 10:32:07 -04:00
Robin Sommer
c2e432c5fa Merge remote-tracking branch 'origin/topic/jsiwek/path-func-record-demote'
* origin/topic/jsiwek/path-func-record-demote:
  Fix filter path_func to allow record argument as a subset of stream's columns.

Conflicts:
	src/LogMgr.cc

Closes #600.
2011-09-15 16:45:41 -07:00
Robin Sommer
62581ede31 Merge remote-tracking branch 'origin/topic/jsiwek/filter-rotation'
* origin/topic/jsiwek/filter-rotation:
  Remove Log::rotation_control (addresses #572).
  Add an optional Log::RotationControl to Log::Filter records.

Closes #572.
2011-09-15 16:28:13 -07:00
Robin Sommer
8d10a76eba Merge remote-tracking branch 'origin/topic/jsiwek/index-opt-record'
* origin/topic/jsiwek/index-opt-record:
  Fix indexing for record types with optional fields

Closes #378.
2011-09-15 16:08:59 -07:00
Robin Sommer
9ee8a9f806 Testing/external scripts no longer compute MD5 checksums for SMTP
entities.

Before, whether they did depended on libmagic. To do that,
smpt/entities.bro gets a new option `never_calc_md5`.

Also restructuring the tests a bit so that load a common
testing-setup.bro scripts that can set a global configuration.
2011-09-15 15:42:10 -07:00
Robin Sommer
4bc18bd3f2 External tests no longer include the full content of mismatching files
in the diagnostics output.
2011-09-15 15:17:31 -07:00
Robin Sommer
ad313a8412 Updating test baselines for recent HTTP output changes. 2011-09-15 15:04:14 -07:00
Seth Hall
8006f26db2 Merge remote-tracking branch 'origin/master' into topic/seth/notice-suppression 2011-09-15 00:27:57 -04:00
Robin Sommer
6ffde1abc2 Updating baselines and testing helper script. 2011-09-12 12:12:47 -07:00
Seth Hall
e0af4f6e8d Small, mostly cosmetic updates and fixing a test.
- The test needed to append the second notice the event queue so that
  the notice would be suppressed correctly.

- Setting $suppress_for manually in apply_policy since it doesn't pick
  up the &default when directly creating the record inside the NOTICE call.
2011-09-12 15:08:25 -04:00
Robin Sommer
83783c5ca7 Bugfix for log writer.
It didn't escape binary stuff in some situations.

Closes #585.
2011-09-11 21:33:09 -07:00
Seth Hall
2d85ab9818 Duplicate notice suppression.
- Duplicate notices are discovered with the new Notice::Info
  field $identifier.  It's a string that is left up to the
  notice implementor to define which would indicate a
  fundamentally duplicate notice.  The field is optional and
  if it's not included it's not possible for notice
  suppression to take place.

- Duplicate notices are suppressed by default for the interval
  defined by the Notice::default_suppression_interval variable
  (1 hour by default).

- A new notice action was defined ACTION_NO_SUPPRESS to prevent
  suppression for a specific notice instance.  A convenience set
  named not_suppressed_types was also created to not suppress
  entire notice types.

- A new field was added to the PolicyItem type to modify the length
  of time a notice should be suppressed if the predicate matches.
  The field is named $suppress_for.  This name makes the code more
  readable like this: $suppress_for = 1day

- New events were created to give visibility into the notice
  framework's suppression activity.
  - event Notice::begin_suppression(n: Notice::Info)
  - event Notice::suppressed(n: Notice::Info)
  - event Notice::end_suppression(n: Notice::Info)

- The suppression.bro script doesn't have a baseline because
  it is causing a segfault in Bro.  This one test is the
  reason that this is being integrated into a branch instead
  of master.
2011-09-11 08:44:48 -04:00
Jon Siwek
7ff2a3e115 Fix filter path_func to allow record argument as a subset of stream's columns.
This required adding the ability for RecordVal::CoerceTo functions to
optionally allow orphaning fields.  The default is to not allow it, but
now before writing to a log, the value of the stream's columns is coerced
down, if necessary, before passing it on to the filter's path_func.

Addresses #600.
2011-09-09 14:57:22 -05:00
Robin Sommer
5e1ec1c50e Fix for proxy usage. 2011-09-09 11:56:44 -07:00
Robin Sommer
cb2cb117d0 Excluding log fields of name mime_type for comparision.
This is because libmagic can return different results depending on
installation.

Note, this still doesn't fix all problems: smtp-entities sets md5
depending on the mime-type returned by libmagic ...
2011-09-09 11:41:03 -07:00
Jon Siwek
eb3c5ee1a4 Fix indexing for record types with optional fields
Addresses #378
2011-09-09 13:06:45 -05:00
Robin Sommer
3a3f58d5df Bugfix for trace updater. 2011-09-08 19:21:52 -07:00
Robin Sommer
7a989c476d Test infrastructure fixes.
- A new helper script to btest-diff a bunch of files simulatiously.

- Fixes to btest.cfg.

- A few further script updates.
2011-09-08 18:50:51 -07:00
Robin Sommer
07dd8eb952 Merge branch 'master' of ssh://git.bro-ids.org/bro 2011-09-08 15:04:38 -07:00
Jon Siwek
fe38c22d2b Remove Log::rotation_control (addresses #572).
Log rotation is now controlled directly through Filter records.

Also addressed a TODO in the default_path_func regarding the
LogMgr::AddFilter function generating internal filter path
suggestions/fallbacks.  Now, if the user doesn't explicitly set a filter
path, the filter's path will be the result of the first call to
default_path_func (happens during the first write to the log).  And in
that case the path suggestion argument to the path_func is an empty
string.
2011-09-08 15:00:31 -05:00
Robin Sommer
bd4a629bef Changes to the testing/external infrastructure.
The traces for external test-suites are no longer kept inside the
repositories themselves but downloaded separately via curl. This is
because git is pretty bad at dealing with large files.

See the README for more information.
2011-09-08 12:36:35 -07:00
Jon Siwek
d8c716ae17 Merge branch 'master' into topic/jsiwek/filter-rotation 2011-09-08 13:01:00 -05:00
Robin Sommer
db8ab89c3a Merge remote branch 'origin/topic/jsiwek/misc-doc-fixes'
* origin/topic/jsiwek/misc-doc-fixes:
  More tweaks to generated script docs.
  Various changes to documentation framework.

Closes #598.
2011-09-08 09:07:20 -07:00
Robin Sommer
c2501cec51 Merge remote branch 'origin/topic/gilbert/rand-pool'
* origin/topic/gilbert/rand-pool:
  Updating tests.
  Updated uid pools to use integer values instead of strings.
  Updating tests.
  Test no longer relevant.  Need a way to generate and test collisions.
  A few minor tweaks to make code less braindead.  Fixed-length piece of pool name now only used to hash when determinism is not required; otherwise, whole pool name is used.  Note that collisions between pool name hashes will lead to sensitivity to initialization order within the UID generator.
  Testing long (>32 character) pool names.
  Simple test to verify various pools are not affecting each other.
  Some working code.  Adds UID pools classified by string.  Just compiles and runs; need to go back through and make sure this code is actually doing what I want it to do.

Note, I've removed the collision detection. Seems unlikely to occur
and even if, it's not really that bad.
2011-09-07 16:17:59 -07:00
Jon Siwek
d2bf33ee19 Merge branch 'master' into topic/jsiwek/filter-rotation 2011-09-07 12:30:47 -05:00
Jon Siwek
95ed192088 More tweaks to generated script docs.
- The "private interface" section is still tracked, but no longer rendered.
  We can judge the usefulness of it later and add back if there's demand.

- Documentation of event handlers was being treated the same as event
  declarations.  Now handlers are tracked separately, but not currently
  rendered in the generated doc output since usefulness is questionable.
2011-09-07 11:33:08 -05:00
Jon Siwek
80e154ba3c Various changes to documentation framework.
- Reorganize top-level 'doc' Makefile target so submodules can easily
  add their own doc-generating routines to it.  e.g. the Bro project
  makes a placeholder 'doc' target, then adds 'restdoc', 'sphinxdoc';
  later Broccoli can add it's own target as a dependency for generating
  API docs.

- Fixed generated docs for BIFs not being organized under a base/
  subdirectory like the original source files.

- Fixed documentation style for function parameters not applying to
  functions declared as record fields.

- Misc. script documentation tweaks to address warnings given by Sphinx.
2011-09-07 10:02:15 -05:00
Gilbert Clark gc355804@ohio.edu
cff47dd98f Updating tests. 2011-09-05 12:12:09 -07:00
Gilbert Clark gc355804@ohio.edu
3953b851e5 Merge branch 'master' into topic/gilbert/rand-pool
Conflicts:
	testing/btest/Baseline/istate.events-ssl/receiver.http.log
	testing/btest/Baseline/istate.events-ssl/sender.http.log
	testing/btest/Baseline/istate.events/receiver.http.log
	testing/btest/Baseline/istate.events/sender.http.log
	testing/btest/Baseline/scripts.base.protocols.smtp.basic/smtp.log
2011-09-05 11:40:34 -07:00
Robin Sommer
33584ec721 Updating test baselines for new ASCII log header. 2011-09-04 13:27:46 -07:00
Robin Sommer
c03d034e49 Updating baselines for recent changes. 2011-09-04 10:18:56 -07:00
Robin Sommer
29e9183f5b Merge remote branch 'origin/topic/jsiwek/nested-record-coerce-fix'
* origin/topic/jsiwek/nested-record-coerce-fix:
  Fix for a case where nested records weren't coerced even though possible.

Closes #571.
2011-09-04 09:00:45 -07:00
Robin Sommer
0d202962bc Merge remote branch 'origin/topic/jsiwek/ascii-log-rotate-fix'
* origin/topic/jsiwek/ascii-log-rotate-fix:
  Change ASCII writer to delay creation of log after rotation until next write.

Closes #570.
2011-09-04 09:00:28 -07:00
Robin Sommer
1c75cd5748 Merge remote branch 'origin/fastpath'
* origin/fastpath:
  Move the `make dist` target into a shell script.
  Update baselines for intervals now using constant 6 decimal place format.
2011-09-04 08:23:28 -07:00
Seth Hall
11c437faa3 Logging framework update and mass Log::ID renaming.
- Log path's are generated in the scripting land
  now.  The default Log stream ID to path string
  mapping works like this:
    - Notice::LOG -> "notice"
    - Notice::POLICY_LOG -> "notice_policy"
    - TestModule::LOG -> "test_module"

- Logging streams updated across all of the shipped
  scripts to be more user friendly.  Instead of
  the logging stream ID HTTP::HTTP, we now have
  HTTP::LOG, etc.

- The priorities on some bro_init handlers have
  been adjusted to make the process of applying
  filters or disabling streams easier for users.
2011-09-03 01:10:17 -04:00
Seth Hall
fe53091cd1 Merge commit '2e853a3'
* commit '2e853a3':
  Change presentation of enum val to include namespace.
2011-09-02 15:04:25 -04:00
Jon Siwek
9c0fc5fe48 Merge branch 'master' into fastpath 2011-09-01 16:32:29 -05:00
Seth Hall
1726aee4e9 Merge remote-tracking branch 'origin/topic/jsiwek/reporter-fatal-bif'
* origin/topic/jsiwek/reporter-fatal-bif:
  Add a Reporter::fatal BIF.
2011-09-01 10:52:39 -04:00
Jon Siwek
02ce833c49 Update baselines for intervals now using constant 6 decimal place format. 2011-08-31 11:17:55 -05:00
Jon Siwek
2e853a3892 Change presentation of enum val to include namespace.
Enum vals now add their full identifier string, including module
namespace to ODescs.
2011-08-31 10:57:19 -05:00
Gilbert Clark gc355804@ohio.edu
97b7140332 Merge remote-tracking branch 'origin/master' into topic/gilbert/rand-pool
Conflicts:
	testing/btest/Baseline/core.vlan-mpls/conn.log
	testing/btest/btest.cfg
2011-08-30 11:59:59 -07:00