mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
dhcp: Remove Broker::auto_publish()
This isn't prettier, but neither worse IMO. A test would be good.
This commit is contained in:
parent
08f2198d3e
commit
cb10852f99
5 changed files with 93 additions and 8 deletions
|
@ -134,13 +134,6 @@ event zeek_init() &priority=5
|
|||
Analyzer::register_for_ports(Analyzer::ANALYZER_DHCP, ports);
|
||||
}
|
||||
|
||||
@if ( Cluster::is_enabled() )
|
||||
event zeek_init()
|
||||
{
|
||||
Broker::auto_publish(Cluster::manager_topic, DHCP::aggregate_msgs);
|
||||
}
|
||||
@endif
|
||||
|
||||
function join_data_expiration(t: table[count] of Info, idx: count): interval
|
||||
{
|
||||
local info = t[idx];
|
||||
|
@ -307,7 +300,11 @@ event DHCP::aggregate_msgs(ts: time, id: conn_id, uid: string, is_orig: bool, ms
|
|||
# Aggregate DHCP messages to the manager.
|
||||
event dhcp_message(c: connection, is_orig: bool, msg: DHCP::Msg, options: DHCP::Options) &priority=-5
|
||||
{
|
||||
event DHCP::aggregate_msgs(network_time(), c$id, c$uid, is_orig, msg, options);
|
||||
if ( Cluster::is_enabled() && Cluster::local_node_type() != Cluster::MANAGER )
|
||||
Broker::publish(Cluster::manager_topic, DHCP::aggregate_msgs,
|
||||
network_time(), c$id, c$uid, is_orig, msg, options);
|
||||
else
|
||||
event DHCP::aggregate_msgs(network_time(), c$id, c$uid, is_orig, msg, options);
|
||||
}
|
||||
|
||||
event zeek_done() &priority=-5
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue