[Bro-Dev] #600: Coercion problem with log funcs

Bro Tracker bro at tracker.bro-ids.org
Wed Sep 7 16:19:49 PDT 2011


#600: Coercion problem with log funcs
------------------------+---------------------
 Reporter:  robin       |       Type:  Problem
   Status:  new         |   Priority:  Normal
Milestone:  Bro1.6      |  Component:  Bro
  Version:  git/master  |   Keywords:  beta
------------------------+---------------------
 The following code:

 {{{
 function split_log(id: Log::ID, path: string, rec: record { id: conn_id; }
 ) : string
 ········{
 ········return Site::is_local_addr(rec$id$orig_h) ? "local" : "remote";
 ········}

 event bro_init()
 ········{
 ········# Add a new filter to the Conn::LOG stream that logs only
 ········# timestamp and originator address.
 ········local filter: Log::Filter = [$name="dst-only",
 $path_func=split_log, $include=set("ts", "id.orig_h")];
 ········Log::add_filter(Conn::LOG, filter);
 ········}
 }}}

 produces

 {{{
     1144876588.568110 fatal error in <no location>: Val::CONVERTER
 (time/record) (1144876583.36149)
 }}}

 That looks like the record coercsion doesn't work right.


 --
 Robin Sommer * Phone +1 (510) 722-6541 * robin at icir.org
 ICSI/LBNL    * Fax   +1 (510) 666-2956 *   www.icir.org

-- 
Ticket URL: <http://tracker.bro-ids.org/bro/ticket/600>
Bro Tracker <http://tracker.bro-ids.org/bro>
Bro Issue Tracker



More information about the bro-dev mailing list