Commit graph

1215 commits

Author SHA1 Message Date
Seth Hall
5245e6596c More cluster framework fixes for BroControl. 2011-07-15 01:11:37 -04:00
Jon Siwek
9d468493f2 Renaming a test better. 2011-07-14 22:06:16 -05:00
Jon Siwek
d97003892b Reimplementation of the @prefixes statement.
Any added prefixes are now used *after* all input files have been
parsed to look for a prefixed, flattened version of the input file
somewhere in BROPATH and, if found, load it.

For example, if "lcl" is in @prefixes, and site.bro is loaded, then
a file named "lcl.site.bro" that's in BROPATH would end up being
automatically loaded as well.  Packages work similarly, e.g. loading
"protocols/http" means a file named "lcl.protocols.http.bro" in BROPATH
gets loaded automatically.
2011-07-14 21:32:02 -05:00
Jon Siwek
e39a49833f Fix accidental overwrite of BROPATH copy. 2011-07-14 18:17:30 -05:00
Seth Hall
3c7f7d571c Fixed the reporter framework to use the newly renamed reporter_info event. 2011-07-14 15:41:38 -04:00
Robin Sommer
5c2ffab892 Merge branch 'master' of ssh://git.bro-ids.org/bro 2011-07-14 11:08:38 -07:00
Jon Siwek
e5e3bf28ec Make @load statements recognize relative paths.
For example a script can do "@load ./foo" to load a script named
foo.bro that lives in the same directory or "@load ../bar" to load
a script named bar.bro in the parent directory, even if those
directories are not contained in BROPATH.
2011-07-14 11:35:23 -05:00
Seth Hall
2045f1e366 Updating a baseline to make a test succeed. 2011-07-14 08:49:33 -04:00
Jon Siwek
f71010a013 Adding test for utils/addrs.bro.
Also fixed the TODO about making check for valid IPv6 string formats
more robust.
2011-07-13 20:25:57 -05:00
Jon Siwek
0dfd5b867e Add unit test for site.bro.
Small fix in site.bro's find_all_emails() to get rid of errors
about accessing non-existent table indices.
2011-07-13 18:35:43 -05:00
Seth Hall
d9f0612546 Lots of cleanup, tests, and the new Control framework.
- Control framework is for runtime control of Bro instances.
  It was extracted from BroControl and made more generic.

- Tests for cluster frameworks and control framework.

- Small fix for btest.cfg

- Fixed a bug in the cluster framework that was causing things to break.
2011-07-13 17:09:20 -04:00
Robin Sommer
250db65043 Merge branch 'master' of ssh://git.bro-ids.org/bro 2011-07-12 18:21:08 -07:00
Seth Hall
427855a40d Fixing the name of a test so that it actually runs. 2011-07-12 16:19:47 -04:00
Seth Hall
b5ca7ceb59 Merge branch 'master' of ssh://git.bro-ids.org/bro 2011-07-12 14:12:44 -04:00
Seth Hall
0332a06012 Fixed most of the tests after the script reorganization. 2011-07-12 14:12:25 -04:00
Robin Sommer
0034eeb99a Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Add git ignore for public trace testing repo path.

(Moved the gitignore entry into the testing/external directory.)
2011-07-12 09:21:33 -07:00
Robin Sommer
f83650f14a Fixing reporter's weird flow method. 2011-07-11 22:18:22 -07:00
Jon Siwek
46ce75fa78 Add git ignore for public trace testing repo path.
To help prevent it from being accidentally added.
2011-07-11 12:44:48 -05:00
Robin Sommer
5113b100d9 Making valgrind a bit more happy, and adding code that may or may not
help with #490 and #491.
2011-07-10 15:07:37 -07:00
Robin Sommer
1d20d2a985 Merge branch 'master' of ssh://git.bro-ids.org/bro 2011-07-09 08:46:28 -07:00
Robin Sommer
42f214b8d0 Test repository directory names no longer need to end in *.git. 2011-07-09 08:44:29 -07:00
Seth Hall
492d93cd8d Checkpoint for Bro side of broctl support. 2011-07-09 01:41:31 -04:00
Seth Hall
8bb240af99 Merge branch 'master' of ssh://git.bro-ids.org/bro 2011-07-08 01:46:01 -04:00
Seth Hall
2c899a8f82 Missed a full path on a @load statement 2011-07-08 01:45:50 -04:00
Seth Hall
0af6e47ccd Removed the policy subpaths from the Bro core. 2011-07-08 00:06:02 -04:00
Seth Hall
b307cbbe64 Large reorganization.
- Scripts now use the full path for @load to remove the subpaths
  from the shipped BROPATH.
- Some script sets have been reorganized to make optional loads
  more obvious.
2011-07-08 00:04:01 -04:00
Robin Sommer
8bacb6eb3d New BiF record_field_vals() that returns the fields of a record in a
table with meta-information.

Example:

type r: record {
	a: count;
	b: string &default="Foo";
	c: double &optional;
	d: string &log;
};

event bro_init()
{
    local x: r = [$a=42, $d="Bar"];
    print record_fields(x);
}

This prints:

  {
  [a] = [type_name=record, log=F, value=42, default_val=<uninitialized>]
  [b] = [type_name=record, log=F, value=<uninitialized>, default_val=Foo],
  [c] = [type_name=record, log=F, value=<uninitialized>, default_val=<uninitialized>],
  [d] = [type_name=record, log=T, value=Bar, default_val=<uninitialized>],
  }

This is one more step in Seth's quest for full inspection support. :-)
2011-07-07 19:56:48 -07:00
Robin Sommer
cdd8827cc4 Adding a script that extracts a connection from a trace based on uid.
The script parsed conn.log to find the 4-tuple and then runs tcpdump
to find the relevant packets.
2011-07-07 19:56:48 -07:00
Robin Sommer
084c2086a4 Fixing bug causing crash when running without arguments. 2011-07-07 19:56:48 -07:00
Robin Sommer
97b5f812c7 A new event bro_script_loaded() raised for each policy script loaded.
Also removing the -l command-line option as that can now be done at
the script-level.

A couple tests fail now that use -l. Leaving that until we have
script-level replacement.
2011-07-07 19:56:26 -07:00
Robin Sommer
df1b2f922b Renaming reporter_message to report_info.
Same change internally.
2011-07-07 19:56:25 -07:00
Robin Sommer
eb0580c622 Fixing another memory leak.
This is the ConnVal leak that Gilbert also saw.
2011-07-07 19:46:40 -07:00
Robin Sommer
d3e764155e Merge branch 'master' of ssh://git.bro-ids.org/bro 2011-07-07 19:39:16 -07:00
Robin Sommer
1ebcf4f422 Merge remote branch 'origin/fastpath'
* origin/fastpath:
  Adding 'delete' fixes into fastpath.
2011-07-07 18:55:08 -07:00
Seth Hall
d1e8722f5f Fixed a problem with the cluster framework unintentionally terminating bro. 2011-07-07 21:28:26 -04:00
Seth Hall
77435d2724 Removing more vestiges of BroCtl from Bro. 2011-07-07 21:24:51 -04:00
Seth Hall
6010f7950e Update for cluster framework.
- CLUSTER_NODE is now specified by name given as the index
  value in the Cluster::nodes variable.  e.g. worker-1
2011-07-07 15:57:25 -04:00
Seth Hall
e4052aba3d Adding a peer name to the communication logs. 2011-07-07 15:15:53 -04:00
Seth Hall
be65acec4e Initial commit of the new cluster framework.
- It's ok to always load the framework.  If you don't
  specifiy the CLUSTER_NODE environment variable it doesn't
  ultimately do anything.
- The $CLUSTER_NODE variable causes the framework to try and
  load a script named cluster-layout.bro which must be located
  somewhere in your $BROPATH.  The value of the $CLUSTER_NODE
  variable is a count that indicates a node in the Cluster::nodes
  variable that is set in the cluster-layout.bro script.
- The Cluster::nodes variable is a flat configuration because
  it's assumed that it would be automatically generated by a
  utility such as BroControl.  This will facilitate the tiered or
  "deep" clustering that is coming.
2011-07-07 13:21:19 -04:00
Seth Hall
ee59c86b8f Restructing bro.init a little bit to load required frameworks at the end. 2011-07-06 10:28:45 -04:00
Seth Hall
02b94f7141 Removed the notice_tag injection from the conn log.
It had some conceptual problems because notices aren't
always logged and in some cases are fairly infrequently
logged which resulted in a lot of notice tags being
attached to connections where the notice didn't show
up in a log file.  Also, the rule of thumb here is that
frameworks should never load protocols.  It's just bad
practice and probably indicates incorrect design somewhere.

The link between the conn log and the notice log should
now be made with the connections unique ID which is logged
in both logs and is more reliable.
2011-07-06 10:23:30 -04:00
Seth Hall
b2af6b9fd5 Adding the reporter framework. Not much there yet. 2011-07-06 10:07:57 -04:00
Seth Hall
46d0cf517b Start detecting Microsoft Sharepoint servers. 2011-07-06 09:18:22 -04:00
Robin Sommer
c8f5a1eeaa Updating submodule(s). 2011-07-05 18:48:55 -07:00
Robin Sommer
b457e7740b Merge branch 'master' of ssh://git.bro-ids.org/bro 2011-07-05 18:48:13 -07:00
Robin Sommer
c738701ffd Cleaning up some testing stuff.
- The Makefiles now run btest with "-f diag.log" so that diangnostics
  output will always be written into that file.

- Makefiles now hardcode path to btest to avoid picking up the wrong version
  if in PATH.

- The canonifier scripts now live in testing/scripts, and they are
  used from both btest/ and external/.

- There's a new diff-remove-uids scripts that removed connection UIDs
  for diffing. The external/* tests now use that by default.

- Timestamp removal now has its own script: diff-remove-timestamps.
  diff-canonifier calls that.

- All Makefile have a "brief" target that runs btest with -b.

- The higher-level directories have Makefile to call the subdirs.
2011-07-05 18:47:08 -07:00
Gilbert Clark gc355804@ohio.edu
21e75891b7 Adding 'delete' fixes into fastpath. 2011-07-05 17:36:29 -07:00
Seth Hall
ef96dc8d4d Spelling mistake caused known-services to not work quite right. 2011-07-05 15:55:33 -04:00
Robin Sommer
1fded82c32 Fixing tests. 2011-07-01 22:26:45 -07:00
Robin Sommer
3340bc0f26 Updating submodule(s). 2011-07-01 22:20:34 -07:00