mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Fix addr/string type confusion in Broker::peers()
Broker::NetworkInfo$address is of type string. The Broker::peers() BiF treated it as an address, which caused ZVal's type validation to flag a mismatch and abort. Includes a small tweak to the broker.unpeer test that makes it invoke Broker::peers(), which breaks in absence of the fix.
This commit is contained in:
parent
b28fc77054
commit
fa38d81a7b
3 changed files with 4 additions and 2 deletions
|
@ -43,6 +43,7 @@ event zeek_init()
|
|||
|
||||
event Broker::peer_added(endpoint: Broker::EndpointInfo, msg: string)
|
||||
{
|
||||
print fmt("peered, now %d peer(s)", |Broker::peers()|);
|
||||
schedule 2secs { print_something(1) };
|
||||
schedule 4secs { unpeer(endpoint) };
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue