# propagation of &mergeable

**URL:** <https://community.zeek.org/t/propagation-of-mergeable/2641>\
**Category:** Zeek\
**Created:** [April 15, 2013, 8:19pm UTC](https://community.zeek.org/t/propagation-of-mergeable/2641 "2013-04-15T20:19:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![David\_Mandelberg](https://avatars.discourse-cdn.com/v4/letter/d/8baadc/32.png) [@David\_Mandelberg](https://community.zeek.org/u/David_Mandelberg)\
**Post date:** [April 15, 2013, 8:19pm UTC](https://community.zeek.org/t/propagation-of-mergeable/2641/1 "2013-04-15T20:19:56Z")

</div>

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()  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&default=copy(empty\_set\_of\_ports)  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&write\_expire=too\_many\_smtp\_servers\_expire;

type HostData: record {  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;...

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;## SMTP servers the host has successfully connected to.  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;smtp\_servers: SMTPServers &default=copy(empty\_smtp\_servers);

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;...  
};

global data: table[addr] of HostData = {}  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&default=[]  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&synchronized  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&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];

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/zeek/original/1X/f09d732bc2cc7c7cc7e35db67cf4e1d5233ce7a7.png) [@system](https://community.zeek.org/u/system)\
**Post date:** [May 6, 2022, 3:40pm UTC](https://community.zeek.org/t/propagation-of-mergeable/2641/2 "2022-05-06T15:40:55Z")

</div>


