[Bro] propagation of &mergeable

David Mandelberg david at mandelberg.org
Mon Apr 15 13:19:56 PDT 2013


Hi,

In the below data structures, is there any way to make &mergeable apply to
the set[port]s? If I make empty_smtp_servers &mergeable, I get an error. If
I make data &mergeable, will it propagate all the way down to the
smtp_servers tables?


type SMTPServers: table[addr] of set[port];

const empty_set_of_ports: set[port] = {};

const empty_smtp_servers: SMTPServers = table()
        &default=copy(empty_set_of_ports)
        &write_expire=too_many_smtp_servers_expire;

type HostData: record {
        ...

        ## SMTP servers the host has successfully connected to.
        smtp_servers: SMTPServers &default=copy(empty_smtp_servers);

        ...
};

global data: table[addr] of HostData = {}
        &default=[]
        &synchronized
        &persistent;


Just to be clear, what I want is the below two lines--run simultaneously
on two nodes--to result in data[192.0.2.1]$smtp_servers[192.0.2.2]
containing both 25/tcp and 587/tcp.

add data[192.0.2.1]$smtp_servers[192.0.2.2][25/tcp];
add data[192.0.2.1]$smtp_servers[192.0.2.2][587/tcp];

-- 
David Eric Mandelberg / dseomn
http://david.mandelberg.org/



More information about the Bro mailing list