Replacing the &synchronized attribute in 2.6


do we have any example how to replace the old &synchronized attribute in the new Broker-powered world? I looked at the documentation (it’s extremely verbose) and found nothing that I could relate to.

Here is the pattern I’m trying to port to 2.6. It’s basically a code that uses the Input Framework, reads some lists, stores them in a simple set and keeps this set synchronized.
The problem might be coming from a not obvious behavior of the &synchronized attribute - I had no idea what it did, I knew that it was supposed to be there.

The old 2.5.5 documentation mentions this attribute briefly

&synchronized - synchronize a variable across nodes ← what nodes are we talking about? what’s the communication flow here? Who is the producer, who is the consumer?
It is impossible to move my scripts over to Broker without answering those questions.

type Idx: record {
whitelist_ip: subnet;

global whitelist_scan_ip: set[subnet] = {} &synchronized; ← the boo-boo is here

event bro_init()

I guess data stores are the way to go.


For the use case in your email, the best option available to you is the Configuration Framework.

# First file:

module TestModule;

export {

option whitelist_scan_ip: set[subnet] = {};

redef Config::config_files += { "/path/to/my/config.dat" };


# /path/to/my/config.dat:

TestModule::whitelist_scan_ip =,,



Thanks, using the configuration framework is easier indeed.

Just for the sake of discussing some broker code - do we have examples how people replace the &synchronized attribute?

Mike Dopheide wrote a blog post (on the Zeek blog) about that exact topic not too long ago. He had spent a lot of time at work fixing a bug with one of our policies and had this deep dive in the process. It’s a good read.

  • Sam

Thanks - this is exactly what I was Googling for (and could not find).