Implement the zeek_init handler.

Implements the change and a test.
This commit is contained in:
Seth Hall 2019-04-12 22:29:40 +02:00
parent f96bc81f85
commit 8cefb9be42
118 changed files with 229 additions and 165 deletions

View file

@ -359,7 +359,7 @@ event Broker::peer_lost(endpoint: Broker::EndpointInfo, msg: string) &priority=1
}
}
event bro_init() &priority=5
event zeek_init() &priority=5
{
# If a node is given, but it's an unknown name we need to fail.
if ( node != "" && node !in nodes )

View file

@ -324,7 +324,7 @@ function mark_pool_node_dead(pool: Pool, name: string): bool
return T;
}
event bro_init()
event zeek_init()
{
worker_pool = register_pool(worker_pool_spec);
proxy_pool = register_pool(proxy_pool_spec);
@ -344,8 +344,8 @@ function pool_sorter(a: Pool, b: Pool): int
return strcmp(a$spec$topic, b$spec$topic);
}
# Needs to execute before the bro_init in setup-connections
event bro_init() &priority=-5
# Needs to execute before the zeek_init in setup-connections
event zeek_init() &priority=-5
{
if ( ! Cluster::is_enabled() )
return;

View file

@ -42,7 +42,7 @@ function connect_peers_with_type(node_type: NodeType)
}
}
event bro_init() &priority=-10
event zeek_init() &priority=-10
{
if ( getenv("BROCTL_CHECK_CONFIG") != "" )
return;