mirror of
https://github.com/zeek/zeek.git
synced 2025-10-05 16:18:19 +00:00
Fix Bro and unit tests when broker is not enabled
When Bro was compiled with broker disabled, then some Bro scripts were referencing functions and types that were not defined. Fixed by adding @ifdefs to several scripts. Removed one @ifdef because it was causing several unit tests to fail. Also fixed the @TEST-REQUIRES check in tests that rely on broker so that such tests are skipped when broker is disabled.
This commit is contained in:
parent
90223fe428
commit
d91dd8d9a8
24 changed files with 39 additions and 20 deletions
|
@ -6,6 +6,8 @@ module NetControl;
|
|||
@load ../plugin
|
||||
@load base/frameworks/broker
|
||||
|
||||
@ifdef ( Broker::__enable )
|
||||
|
||||
export {
|
||||
type AclRule : record {
|
||||
command: string;
|
||||
|
@ -292,3 +294,4 @@ function create_acld(config: AcldConfig) : PluginState
|
|||
return p;
|
||||
}
|
||||
|
||||
@endif
|
||||
|
|
|
@ -8,6 +8,8 @@ module NetControl;
|
|||
@load ../plugin
|
||||
@load base/frameworks/broker
|
||||
|
||||
@ifdef ( Broker::__enable )
|
||||
|
||||
export {
|
||||
## Instantiates the broker plugin.
|
||||
global create_broker: function(host: addr, host_port: port, topic: string, can_expire: bool &default=F) : PluginState;
|
||||
|
@ -161,3 +163,5 @@ function create_broker(host: addr, host_port: port, topic: string, can_expire: b
|
|||
|
||||
return p;
|
||||
}
|
||||
|
||||
@endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue