Commit graph

3375 commits

Author SHA1 Message Date
Robin Sommer
acb6c0a0a5 Merge branch 'robin/topic/writer-info'
* robin/topic/writer-info:
  Bugfix. Using a custom rotate function was broken.
2012-07-02 16:59:56 -07:00
Robin Sommer
d26a96bd47 Bugfix. Using a custom rotate function was broken. 2012-07-02 16:57:16 -07:00
Robin Sommer
3fcece44cb Tiny bugfix for returning writer name. 2012-07-02 16:36:09 -07:00
Robin Sommer
b3155b7b4b Moving make target update-doc-sources from top-level Makefile to btest
Makefile.
2012-07-02 16:14:24 -07:00
Robin Sommer
5ede1418fc Updating baselines. 2012-07-02 16:12:21 -07:00
Robin Sommer
e64822f2f9 Updating NEWS. 2012-07-02 16:12:09 -07:00
Robin Sommer
ff73f3a040 Fixing merge relicts. 2012-07-02 16:11:42 -07:00
Robin Sommer
ef3da87b3f Updating submodule(s).
[nomail]
2012-07-02 16:02:21 -07:00
Robin Sommer
8afcedad59 Merge remote-tracking branch 'origin/topic/bernhard/reader-info'
* origin/topic/bernhard/reader-info:

Conflicts:
	src/logging/WriterBackend.cc
	src/logging/WriterBackend.h
	src/logging/WriterFrontend.cc
	testing/btest/Baseline/scripts.base.frameworks.input.event/out
	testing/btest/Baseline/scripts.base.frameworks.input.executeraw/out
	testing/btest/Baseline/scripts.base.frameworks.input.raw/out
	testing/btest/Baseline/scripts.base.frameworks.input.rereadraw/out
	testing/btest/Baseline/scripts.base.frameworks.input.tableevent/out
2012-07-02 15:38:38 -07:00
Bernhard Amann
86826770ab Merge remote-tracking branch 'origin/fastpath' into topic/bernhard/reader-info
Conflicts:
	src/logging/WriterBackend.cc
	src/logging/WriterBackend.h
	src/logging/WriterFrontend.cc
	testing/btest/Baseline/scripts.base.frameworks.input.event/out
	testing/btest/Baseline/scripts.base.frameworks.input.executeraw/out
	testing/btest/Baseline/scripts.base.frameworks.input.raw/out
	testing/btest/Baseline/scripts.base.frameworks.input.rereadraw/out
	testing/btest/Baseline/scripts.base.frameworks.input.tableevent/out
2012-07-02 15:33:12 -07:00
Robin Sommer
06d2fd52bd Merge remote-tracking branch 'origin/topic/bernhard/reader-info'
* origin/topic/bernhard/reader-info:
  fix small bug - now configuration actually is passed.
  add mode to readerinfo - no need to have it separately everywhere anymore.
  introduce reader-info struct analogous to writer-info.
  Introduce support for a table of key/value pairs with further configuration options, with the same userinterface as in the logging interface.
  make writer-info work when debugging is enabled

Conflicts:
	testing/btest/Baseline/scripts.base.frameworks.input.event/out
	testing/btest/Baseline/scripts.base.frameworks.input.executeraw/out
	testing/btest/Baseline/scripts.base.frameworks.input.raw/out
	testing/btest/Baseline/scripts.base.frameworks.input.rereadraw/out
	testing/btest/Baseline/scripts.base.frameworks.input.tableevent/out

Closes #841.
2012-07-02 15:33:08 -07:00
Robin Sommer
90763bb2f2 Merge branch 'robin/topic/writer-info'
* robin/topic/writer-info:
  Extending the log writer DoInit() API.
  Reworking log writer API to make it easier to pass additional information to a writer's initialization method.

Conflicts:
	src/logging/WriterBackend.cc
	src/logging/WriterBackend.h
	src/logging/WriterFrontend.cc
2012-07-02 15:20:37 -07:00
Robin Sommer
9183309482 Merge remote-tracking branch 'origin/topic/bernhard/input-crash-search'
* origin/topic/bernhard/input-crash-search:
  for bug-searching:

Closes #840
2012-07-02 15:10:27 -07:00
Robin Sommer
de6e5c951a Merge remote-tracking branch 'origin/topic/jsiwek/icmp6-ndp-options'
* origin/topic/jsiwek/icmp6-ndp-options:
  Extract ICMPv6 NDP options and include in ICMP events (addresses #833).

Closes #833.
2012-07-02 15:00:00 -07:00
Robin Sommer
9f6cf1ad90 Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Fix inconsistencies in random number generation.
  Updating input framework unit tests.
  Add front-end name to InitMessage from WriterFrontend to Backend.
  Small tweak to make test complete quicker.
  Drain events before terminating log/thread managers.
  Fix strict-aliasing warning in RemoteSerializer.cc (fixes #834).
  Fix typos in event documentation
  Fix typos in NEWS for Bro 2.1 beta
2012-07-02 14:51:31 -07:00
Bernhard Amann
f65e3f5b9f fix small bug - now configuration actually is passed. 2012-07-02 11:07:50 -07:00
Bernhard Amann
7f83f157fc add mode to readerinfo - no need to have it separately everywhere anymore.
Disable remoteserialization of readerinfo - in contrast to the logging framework this is not needed here (I think).
2012-07-02 10:41:02 -07:00
Bernhard Amann
3559a39d59 introduce reader-info struct analogous to writer-info.
All tests still pass.
2012-07-02 10:03:28 -07:00
Jon Siwek
34ead91f99 Fix inconsistencies in random number generation.
The srand()/rand() interface was being intermixed with the
srandom()/random() one.  The later is now used throughout.

Changed the srand() and rand() BIFs to work deterministically if Bro
was given a seed file (addresses #825).  They also now wrap the
system's srandom() and random() instead of srand() and rand() as per
the above.
2012-06-29 16:24:31 -05:00
Jon Siwek
0e48fda6ff Updating input framework unit tests.
Generally tried to make them more reliable and execute quicker.
They all now load the listen script as a trick to make sure input
sources are fully read, but also terminate() at appropriate times
so that they don't take more time than needed.  They're also all
serialized with the 'comm' group so listening on a port doesn't
interfere with the communication tests.
2012-06-29 12:50:57 -05:00
Bernhard Amann
f820ee9f5c Introduce support for a table of key/value pairs with further configuration options,
with the same userinterface as in the logging interface.

Not really tested, but tests still work.
2012-06-28 16:16:48 -07:00
Bernhard Amann
227159fd04 make writer-info work when debugging is enabled 2012-06-28 15:08:35 -07:00
Bernhard Amann
3dd72f6f45 Merge remote-tracking branch 'origin/master' into topic/bernhard/reader-info 2012-06-28 15:08:23 -07:00
Jon Siwek
41f1544332 Add front-end name to InitMessage from WriterFrontend to Backend.
At the time WriterBackend::Init() happens, it's in a different thread
than its frontend member, but tried to access it directly to get its
name, that info is now sent in the InitMessage instead.

(Problem was observed segfaulting the unit test
scripts.base.frameworks.notice.mail-alarms on Ubuntu 12.04).
2012-06-28 15:48:03 -05:00
Jon Siwek
1bbd63970a Small tweak to make test complete quicker. 2012-06-28 15:16:33 -05:00
Jon Siwek
21a0e74d68 Drain events before terminating log/thread managers.
Using the default scripts, the events from RemoteSerializer::LogStats()
were attempting to use the logging framework after logging/threading
had been terminated which never worked right and sometimes caused
crashes with "fatal error: cannot lock mutex".

Also made communication log baseline test pass more reliably.
2012-06-28 12:42:32 -05:00
Jon Siwek
a651185ff9 Fix strict-aliasing warning in RemoteSerializer.cc (fixes #834). 2012-06-27 11:35:32 -05:00
Jon Siwek
9ae9b2aa4d Extract ICMPv6 NDP options and include in ICMP events (addresses #833).
This adds a new parameter of type "icmp6_nd_options" to the ICMPv6
neighbor discovery events (icmp_redirect, icmp_router_solicitation,
icmp_router_advertisement, icmp_neighbor_solicitation,
icmp_neighbor_advertisement) which includes data extracted from
all neighbor discovery options (RFC 4861) that are present in the
ICMPv6 message.
2012-06-26 17:10:00 -05:00
Daniel Thayer
94f0bf2157 Fix typos in event documentation
Fix typos previously committed (but apparently overwritten later), and
fix typos for new events.
2012-06-26 14:55:36 -05:00
Daniel Thayer
5ab2545ff3 Fix typos in NEWS for Bro 2.1 beta 2012-06-26 11:03:15 -05:00
Bernhard Amann
c7338a0731 for bug-searching:
set frontend type before starting the thread. This means that the thread type will be output correctly in the error message.

return errno string of pthread functions called in thread start
2012-06-25 14:54:15 -07:00
Jon Siwek
c3b9a2a29c Fix typo in NEWS. 2012-06-25 13:09:16 -05:00
Robin Sommer
19eea409c3 Extending the log writer DoInit() API.
We now pass in a Info struct that contains:

    - the path name (as before)
    - the rotation interval
    - the log_rotate_base_time in seconds
    - a table of key/value pairs with further configuration options.

To fill the table, log filters have a new field "config: table[string]
of strings". This gives a way to pass arbitrary values from
script-land to writers. Interpretation is left up to the writer.

Also splits calc_next_rotate() into two functions, one of which is
thread-safe and can be used with the log_rotate_base_time value from
DoInit().

Includes also updates to the None writer:

    - It gets its own script writers/none.bro.

    - New bool option LogNone::debug to enable debug output. It then
      prints out all the values passed to DoInit(). That's used by a
      btest test to ensure the new DoInit() values are right.

    - Fixed a bug that prevented Bro from terminating..

(scripts.base.frameworks.logging.rotate-custom currently fails.
Haven't yet investigated why.)
2012-06-21 17:42:33 -07:00
Robin Sommer
b38d1e1ec2 Reworking log writer API to make it easier to pass additional
information to a writer's initialization method.

However, for now the information provided is still the same.
2012-06-21 11:57:45 -07:00
Robin Sommer
0ca0119f2a Merge remote-tracking branch 'origin/topic/jsiwek/interpreter-exception-fix'
* origin/topic/jsiwek/interpreter-exception-fix:
  Fix exceptions thrown in event handlers preventing others from running.
2012-06-21 10:15:12 -07:00
Robin Sommer
fb8e9fc5f0 Merge remote-tracking branch 'origin/topic/seth/tunnels-merge'
* origin/topic/seth/tunnels-merge:
  Add another SOCKS command.

Conflicts:
	scripts/base/protocols/socks/consts.bro
2012-06-21 10:12:43 -07:00
Seth Hall
3eb16e5738 Add another SOCKS command. 2012-06-21 02:07:30 -04:00
Robin Sommer
54670817fa Merge remote-tracking branch 'origin/topic/seth/tunnels-merge'
* origin/topic/seth/tunnels-merge:
  Fixed some problems with the SOCKS analyzer and tests.

Conflicts:
	scripts/base/protocols/socks/main.bro
	src/socks-analyzer.pac
2012-06-20 21:05:04 -07:00
Seth Hall
6b8b4dab71 Fixed some problems with the SOCKS analyzer and tests. 2012-06-20 22:57:46 -04:00
Robin Sommer
8b99cc4a47 Updating NEWS in preparation for beta.
Feel free to suggest edits/extensions.
2012-06-20 16:02:20 -07:00
Robin Sommer
737706994b Accepting different AF_INET6 values for loopback link headers.
Turns out they differ by platform.
2012-06-20 15:42:03 -07:00
Robin Sommer
5f75850577 Updating baselines. 2012-06-20 15:13:39 -07:00
Robin Sommer
1564edb296 Fixing merge left-over. 2012-06-20 14:46:54 -07:00
Robin Sommer
232585c96c Updating submodule(s).
[nomail]
2012-06-20 14:34:31 -07:00
Robin Sommer
6cda00c75e Merge remote-tracking branch 'origin/topic/seth/tunnels-merge'
* origin/topic/seth/tunnels-merge:
  SOCKS DPD fixes.
  Fix a bug in the SOCKS analyzer.
  SOCKS and tunnel test updates.
  Updates for the SOCKS analyzer.
  Very small updates to the tunnels framework.
2012-06-20 14:33:18 -07:00
Seth Hall
f59736cb17 SOCKS DPD fixes.
- Restricted the SOCKS 5 DPD signatures further.

- Added protocol violations.
2012-06-20 15:12:52 -04:00
Seth Hall
886cc7368f Fix a bug in the SOCKS analyzer. 2012-06-20 14:20:06 -04:00
Seth Hall
a60153060d SOCKS and tunnel test updates. 2012-06-20 14:19:49 -04:00
Seth Hall
896f252a31 Updates for the SOCKS analyzer.
- Now supports SOCKSv5 in the analyzer and the DPD sigs.

- Reworked the core events.

- Tests.

- A SOCKS log!
2012-06-20 13:58:25 -04:00
Seth Hall
c30c0d5ff2 Very small updates to the tunnels framework.
- Make the uid field optional since it's conceptually incorrect
  for proxies being treated as tunnels to have it.

- Reordered two fields in the log.

- Reduced the default tunnel expiration interface to something more
  reasonable (1 hour).
2012-06-20 13:56:42 -04:00