update
Former-commit-id: bdede6ed1b6f578f2ef046c338caf02d0b29d453 [formerly 7187de361b53e9c8ec121df379b762f2db736ea2] Former-commit-id: 447d58460fbbfd05ffe08428a1288e392637561d
This commit is contained in:
26
_embed/public/ace/demo/kitchen-sink/docs/bro.bro
Normal file
26
_embed/public/ace/demo/kitchen-sink/docs/bro.bro
Normal file
@@ -0,0 +1,26 @@
|
||||
##! Add countries for the originator and responder of a connection
|
||||
##! to the connection logs.
|
||||
|
||||
module Conn;
|
||||
|
||||
export {
|
||||
redef record Conn::Info += {
|
||||
## Country code for the originator of the connection based
|
||||
## on a GeoIP lookup.
|
||||
orig_cc: string &optional &log;
|
||||
## Country code for the responser of the connection based
|
||||
## on a GeoIP lookup.
|
||||
resp_cc: string &optional &log;
|
||||
};
|
||||
}
|
||||
|
||||
event connection_state_remove(c: connection)
|
||||
{
|
||||
local orig_loc = lookup_location(c$id$orig_h);
|
||||
if ( orig_loc?$country_code )
|
||||
c$conn$orig_cc = orig_loc$country_code;
|
||||
|
||||
local resp_loc = lookup_location(c$id$resp_h);
|
||||
if ( resp_loc?$country_code )
|
||||
c$conn$resp_cc = resp_loc$country_code;
|
||||
}
|
||||
Reference in New Issue
Block a user