mirror of
https://github.com/zeek/zeek.git
synced 2025-10-10 10:38:20 +00:00
Merge remote-tracking branch 'origin/master' into topic/robin/reader-writer-plugins
This commit is contained in:
commit
355314718b
12 changed files with 91 additions and 61 deletions
18
CHANGES
18
CHANGES
|
@ -1,4 +1,22 @@
|
||||||
|
|
||||||
|
2.3-96 | 2014-08-01 14:35:01 -0700
|
||||||
|
|
||||||
|
* Small change to DHCP documentation. In server->client messages the
|
||||||
|
host name may differ from the one requested by the client.
|
||||||
|
(Johanna Amann)
|
||||||
|
|
||||||
|
* Split DHCP log writing from record creation. This allows users to
|
||||||
|
customize dhcp.log by changing the record in their own dhcp_ack
|
||||||
|
event. (Johanna Amann)
|
||||||
|
|
||||||
|
* Update PATH so that documentation btests can find bro-cut. (Daniel
|
||||||
|
Thayer)
|
||||||
|
|
||||||
|
* Remove gawk from list of optional packages in documentation.
|
||||||
|
(Daniel Thayer)
|
||||||
|
|
||||||
|
* Fix for redefining built-in constants. (Robin Sommer)
|
||||||
|
|
||||||
2.3-86 | 2014-07-31 14:19:58 -0700
|
2.3-86 | 2014-07-31 14:19:58 -0700
|
||||||
|
|
||||||
* Fix for redefining built-in constants. (Robin Sommer)
|
* Fix for redefining built-in constants. (Robin Sommer)
|
||||||
|
|
1
NEWS
1
NEWS
|
@ -28,6 +28,7 @@ New Functionality
|
||||||
Changed Functionality
|
Changed Functionality
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
|
- bro-cut has been rewritten in C, and is hence much faster.
|
||||||
|
|
||||||
Bro 2.3
|
Bro 2.3
|
||||||
=======
|
=======
|
||||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
2.3-86
|
2.3-96
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 231a593eb851713cc8da1ece3ce90d9317fb46b7
|
Subproject commit 30c156d879f6303f15ebf8e59989d8a42d882bdf
|
|
@ -1 +1 @@
|
||||||
Subproject commit 1f1f2351635bf3f437f35ceb6ba898ccff28dfea
|
Subproject commit 07cfcc76fb08365b545bd3f412c3f6e6c92824e9
|
|
@ -1 +1 @@
|
||||||
Subproject commit 2ebe2e3c9298fd21b06ff93dab8c6980edef144b
|
Subproject commit 2606a95c9dcbc83bd863c2981ce7189e5d58697b
|
|
@ -21,7 +21,7 @@ sys.path.insert(0, os.path.abspath('sphinx_input/ext'))
|
||||||
|
|
||||||
# ----- Begin of BTest configuration. -----
|
# ----- Begin of BTest configuration. -----
|
||||||
btest = os.path.abspath("@CMAKE_SOURCE_DIR@/aux/btest")
|
btest = os.path.abspath("@CMAKE_SOURCE_DIR@/aux/btest")
|
||||||
brocut = os.path.abspath("@CMAKE_SOURCE_DIR@/aux/bro-aux/bro-cut")
|
brocut = os.path.abspath("@CMAKE_SOURCE_DIR@/build/aux/bro-aux/bro-cut")
|
||||||
bro = os.path.abspath("@CMAKE_SOURCE_DIR@/build/src")
|
bro = os.path.abspath("@CMAKE_SOURCE_DIR@/build/src")
|
||||||
|
|
||||||
os.environ["PATH"] += (":%s:%s/sphinx:%s:%s" % (btest, btest, bro, brocut))
|
os.environ["PATH"] += (":%s:%s/sphinx:%s:%s" % (btest, btest, bro, brocut))
|
||||||
|
|
|
@ -91,7 +91,6 @@ build time:
|
||||||
|
|
||||||
* LibGeoIP (for geolocating IP addresses)
|
* LibGeoIP (for geolocating IP addresses)
|
||||||
* sendmail (enables Bro and BroControl to send mail)
|
* sendmail (enables Bro and BroControl to send mail)
|
||||||
* gawk (enables all features of bro-cut)
|
|
||||||
* curl (used by a Bro script that implements active HTTP)
|
* curl (used by a Bro script that implements active HTTP)
|
||||||
* gperftools (tcmalloc is used to improve memory and CPU usage)
|
* gperftools (tcmalloc is used to improve memory and CPU usage)
|
||||||
* ipsumdump (for trace-summary; http://www.cs.ucla.edu/~kohler/ipsumdump)
|
* ipsumdump (for trace-summary; http://www.cs.ucla.edu/~kohler/ipsumdump)
|
||||||
|
|
|
@ -47,13 +47,13 @@ redef record connection += {
|
||||||
const ports = { 67/udp, 68/udp };
|
const ports = { 67/udp, 68/udp };
|
||||||
redef likely_server_ports += { 67/udp };
|
redef likely_server_ports += { 67/udp };
|
||||||
|
|
||||||
event bro_init()
|
event bro_init() &priority=5
|
||||||
{
|
{
|
||||||
Log::create_stream(DHCP::LOG, [$columns=Info, $ev=log_dhcp]);
|
Log::create_stream(DHCP::LOG, [$columns=Info, $ev=log_dhcp]);
|
||||||
Analyzer::register_for_ports(Analyzer::ANALYZER_DHCP, ports);
|
Analyzer::register_for_ports(Analyzer::ANALYZER_DHCP, ports);
|
||||||
}
|
}
|
||||||
|
|
||||||
event dhcp_ack(c: connection, msg: dhcp_msg, mask: addr, router: dhcp_router_list, lease: interval, serv_addr: addr, host_name: string)
|
event dhcp_ack(c: connection, msg: dhcp_msg, mask: addr, router: dhcp_router_list, lease: interval, serv_addr: addr, host_name: string) &priority=5
|
||||||
{
|
{
|
||||||
local info: Info;
|
local info: Info;
|
||||||
info$ts = network_time();
|
info$ts = network_time();
|
||||||
|
@ -71,6 +71,9 @@ event dhcp_ack(c: connection, msg: dhcp_msg, mask: addr, router: dhcp_router_lis
|
||||||
info$assigned_ip = c$id$orig_h;
|
info$assigned_ip = c$id$orig_h;
|
||||||
|
|
||||||
c$dhcp = info;
|
c$dhcp = info;
|
||||||
|
}
|
||||||
|
|
||||||
|
event dhcp_ack(c: connection, msg: dhcp_msg, mask: addr, router: dhcp_router_list, lease: interval, serv_addr: addr, host_name: string) &priority=-5
|
||||||
|
{
|
||||||
Log::write(DHCP::LOG, c$dhcp);
|
Log::write(DHCP::LOG, c$dhcp);
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,8 @@ event dhcp_discover%(c: connection, msg: dhcp_msg, req_addr: addr, host_name: st
|
||||||
##
|
##
|
||||||
## serv_addr: The server address specified by the message.
|
## serv_addr: The server address specified by the message.
|
||||||
##
|
##
|
||||||
## host_name: The value of the host name option, if specified by the client.
|
## host_name: Optional host name value. May differ from the host name requested
|
||||||
|
## from the client.
|
||||||
##
|
##
|
||||||
## .. bro:see:: dhcp_discover dhcp_request dhcp_decline dhcp_ack dhcp_nak
|
## .. bro:see:: dhcp_discover dhcp_request dhcp_decline dhcp_ack dhcp_nak
|
||||||
## dhcp_release dhcp_inform
|
## dhcp_release dhcp_inform
|
||||||
|
@ -75,7 +76,7 @@ event dhcp_request%(c: connection, msg: dhcp_msg, req_addr: addr, serv_addr: add
|
||||||
##
|
##
|
||||||
## msg: The parsed type-independent part of the DHCP message.
|
## msg: The parsed type-independent part of the DHCP message.
|
||||||
##
|
##
|
||||||
## host_name: The value of the host name option, if specified by the client.
|
## host_name: Optional host name value.
|
||||||
##
|
##
|
||||||
## .. bro:see:: dhcp_discover dhcp_offer dhcp_request dhcp_ack dhcp_nak
|
## .. bro:see:: dhcp_discover dhcp_offer dhcp_request dhcp_ack dhcp_nak
|
||||||
## dhcp_release dhcp_inform
|
## dhcp_release dhcp_inform
|
||||||
|
@ -101,7 +102,8 @@ event dhcp_decline%(c: connection, msg: dhcp_msg, host_name: string%);
|
||||||
##
|
##
|
||||||
## serv_addr: The server address specified by the message.
|
## serv_addr: The server address specified by the message.
|
||||||
##
|
##
|
||||||
## host_name: The value of the host name option, if specified by the client.
|
## host_name: Optional host name value. May differ from the host name requested
|
||||||
|
## from the client.
|
||||||
##
|
##
|
||||||
## .. bro:see:: dhcp_discover dhcp_offer dhcp_request dhcp_decline dhcp_nak
|
## .. bro:see:: dhcp_discover dhcp_offer dhcp_request dhcp_decline dhcp_nak
|
||||||
## dhcp_release dhcp_inform
|
## dhcp_release dhcp_inform
|
||||||
|
@ -116,7 +118,7 @@ event dhcp_ack%(c: connection, msg: dhcp_msg, mask: addr, router: dhcp_router_li
|
||||||
##
|
##
|
||||||
## msg: The parsed type-independent part of the DHCP message.
|
## msg: The parsed type-independent part of the DHCP message.
|
||||||
##
|
##
|
||||||
## host_name: The value of the host name option, if specified by the client.
|
## host_name: Optional host name value.
|
||||||
##
|
##
|
||||||
## .. bro:see:: dhcp_discover dhcp_offer dhcp_request dhcp_decline dhcp_ack dhcp_release
|
## .. bro:see:: dhcp_discover dhcp_offer dhcp_request dhcp_decline dhcp_ack dhcp_release
|
||||||
## dhcp_inform
|
## dhcp_inform
|
||||||
|
|
|
@ -542,7 +542,8 @@ int Manager::HookLoadFile(const string& file)
|
||||||
|
|
||||||
int rc = -1;
|
int rc = -1;
|
||||||
|
|
||||||
for ( hook_list::iterator i = l->begin(); l && i != l->end(); i++ )
|
if ( l )
|
||||||
|
for ( hook_list::iterator i = l->begin(); i != l->end(); ++i )
|
||||||
{
|
{
|
||||||
Plugin* p = (*i).second;
|
Plugin* p = (*i).second;
|
||||||
|
|
||||||
|
@ -573,7 +574,8 @@ Val* Manager::HookCallFunction(const Func* func, val_list* vargs) const
|
||||||
|
|
||||||
Val* v = 0;
|
Val* v = 0;
|
||||||
|
|
||||||
for ( hook_list::iterator i = l->begin(); l && i != l->end(); i++ )
|
if ( l )
|
||||||
|
for ( hook_list::iterator i = l->begin(); i != l->end(); ++i )
|
||||||
{
|
{
|
||||||
Plugin* p = (*i).second;
|
Plugin* p = (*i).second;
|
||||||
|
|
||||||
|
@ -603,7 +605,8 @@ bool Manager::HookQueueEvent(Event* event) const
|
||||||
|
|
||||||
bool result = false;
|
bool result = false;
|
||||||
|
|
||||||
for ( hook_list::iterator i = l->begin(); l && i != l->end(); i++ )
|
if ( l )
|
||||||
|
for ( hook_list::iterator i = l->begin(); i != l->end(); ++i )
|
||||||
{
|
{
|
||||||
Plugin* p = (*i).second;
|
Plugin* p = (*i).second;
|
||||||
|
|
||||||
|
@ -629,7 +632,8 @@ void Manager::HookDrainEvents() const
|
||||||
|
|
||||||
hook_list* l = hooks[HOOK_DRAIN_EVENTS];
|
hook_list* l = hooks[HOOK_DRAIN_EVENTS];
|
||||||
|
|
||||||
for ( hook_list::iterator i = l->begin(); l && i != l->end(); i++ )
|
if ( l )
|
||||||
|
for ( hook_list::iterator i = l->begin(); i != l->end(); ++i )
|
||||||
{
|
{
|
||||||
Plugin* p = (*i).second;
|
Plugin* p = (*i).second;
|
||||||
p->HookDrainEvents();
|
p->HookDrainEvents();
|
||||||
|
@ -652,7 +656,8 @@ void Manager::HookUpdateNetworkTime(double network_time) const
|
||||||
|
|
||||||
hook_list* l = hooks[HOOK_UPDATE_NETWORK_TIME];
|
hook_list* l = hooks[HOOK_UPDATE_NETWORK_TIME];
|
||||||
|
|
||||||
for ( hook_list::iterator i = l->begin(); l && i != l->end(); i++ )
|
if ( l )
|
||||||
|
for ( hook_list::iterator i = l->begin(); i != l->end(); ++i )
|
||||||
{
|
{
|
||||||
Plugin* p = (*i).second;
|
Plugin* p = (*i).second;
|
||||||
p->HookUpdateNetworkTime(network_time);
|
p->HookUpdateNetworkTime(network_time);
|
||||||
|
@ -674,7 +679,8 @@ void Manager::HookBroObjDtor(void* obj) const
|
||||||
|
|
||||||
hook_list* l = hooks[HOOK_BRO_OBJ_DTOR];
|
hook_list* l = hooks[HOOK_BRO_OBJ_DTOR];
|
||||||
|
|
||||||
for ( hook_list::iterator i = l->begin(); l && i != l->end(); i++ )
|
if ( l )
|
||||||
|
for ( hook_list::iterator i = l->begin(); i != l->end(); ++i )
|
||||||
{
|
{
|
||||||
Plugin* p = (*i).second;
|
Plugin* p = (*i).second;
|
||||||
p->HookBroObjDtor(obj);
|
p->HookBroObjDtor(obj);
|
||||||
|
@ -682,14 +688,14 @@ void Manager::HookBroObjDtor(void* obj) const
|
||||||
|
|
||||||
if ( HavePluginForHook(META_HOOK_POST) )
|
if ( HavePluginForHook(META_HOOK_POST) )
|
||||||
MetaHookPost(HOOK_BRO_OBJ_DTOR, args, HookArgument());
|
MetaHookPost(HOOK_BRO_OBJ_DTOR, args, HookArgument());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Manager::MetaHookPre(HookType hook, const HookArgumentList& args) const
|
void Manager::MetaHookPre(HookType hook, const HookArgumentList& args) const
|
||||||
{
|
{
|
||||||
hook_list* l = hooks[HOOK_CALL_FUNCTION];
|
hook_list* l = hooks[HOOK_CALL_FUNCTION];
|
||||||
|
|
||||||
for ( hook_list::iterator i = l->begin(); l && i != l->end(); i++ )
|
if ( l )
|
||||||
|
for ( hook_list::iterator i = l->begin(); i != l->end(); ++i )
|
||||||
{
|
{
|
||||||
Plugin* p = (*i).second;
|
Plugin* p = (*i).second;
|
||||||
p->MetaHookPre(hook, args);
|
p->MetaHookPre(hook, args);
|
||||||
|
@ -700,7 +706,8 @@ void Manager::MetaHookPost(HookType hook, const HookArgumentList& args, HookArgu
|
||||||
{
|
{
|
||||||
hook_list* l = hooks[HOOK_CALL_FUNCTION];
|
hook_list* l = hooks[HOOK_CALL_FUNCTION];
|
||||||
|
|
||||||
for ( hook_list::iterator i = l->begin(); l && i != l->end(); i++ )
|
if ( l )
|
||||||
|
for ( hook_list::iterator i = l->begin(); i != l->end(); ++i )
|
||||||
{
|
{
|
||||||
Plugin* p = (*i).second;
|
Plugin* p = (*i).second;
|
||||||
p->MetaHookPost(hook, args, result);
|
p->MetaHookPost(hook, args, result);
|
||||||
|
|
|
@ -13,7 +13,7 @@ BRO_PLUGIN_PATH=
|
||||||
TZ=UTC
|
TZ=UTC
|
||||||
LC_ALL=C
|
LC_ALL=C
|
||||||
BTEST_PATH=%(testbase)s/../../aux/btest
|
BTEST_PATH=%(testbase)s/../../aux/btest
|
||||||
PATH=%(testbase)s/../../build/src:%(testbase)s/../scripts:%(testbase)s/../../aux/btest:%(testbase)s/../../aux/bro-aux/bro-cut:%(default_path)s:%(testbase)s/../../aux/btest/sphinx:%(default_path)s
|
PATH=%(testbase)s/../../build/src:%(testbase)s/../scripts:%(testbase)s/../../aux/btest:%(testbase)s/../../build/aux/bro-aux/bro-cut:%(default_path)s:%(testbase)s/../../aux/btest/sphinx:%(default_path)s
|
||||||
TRACES=%(testbase)s/Traces
|
TRACES=%(testbase)s/Traces
|
||||||
FILES=%(testbase)s/Files
|
FILES=%(testbase)s/Files
|
||||||
SCRIPTS=%(testbase)s/../scripts
|
SCRIPTS=%(testbase)s/../scripts
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue