Fix possible race in netcontrol acld/broker plugins

Best to subscribe before connecting
This commit is contained in:
Jon Siwek 2018-08-17 10:29:58 -05:00
parent a04c76c035
commit fc7d3cd981
4 changed files with 7 additions and 3 deletions

View file

@ -1,4 +1,8 @@
2.5-849 | 2018-08-17 10:29:58 -0500
* Fix possible race in netcontrol acld/broker plugins (Jon Siwek, Corelight)
2.5-848 | 2018-08-16 17:21:28 -0500
* Enable SMB by default by moving scripts from policy/ to base/

View file

@ -1 +1 @@
2.5-848
2.5-849

View file

@ -270,8 +270,8 @@ function acld_remove_rule_fun(p: PluginState, r: Rule, reason: string) : bool
function acld_init(p: PluginState)
{
Broker::peer(cat(p$acld_config$acld_host), p$acld_config$acld_port);
Broker::subscribe(p$acld_config$acld_topic);
Broker::peer(cat(p$acld_config$acld_host), p$acld_config$acld_port);
}
event Broker::peer_added(endpoint: Broker::EndpointInfo, msg: string)

View file

@ -164,8 +164,8 @@ function broker_remove_rule_fun(p: PluginState, r: Rule, reason: string) : bool
function broker_init(p: PluginState)
{
Broker::peer(cat(p$broker_config$host), p$broker_config$bport);
Broker::subscribe(p$broker_config$topic);
Broker::peer(cat(p$broker_config$host), p$broker_config$bport);
}
event Broker::peer_added(endpoint: Broker::EndpointInfo, msg: string)