<div dir="ltr">Excellent, thanks Jon!<div><br></div><div>-Dop</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 15, 2018 at 11:18 AM, Jon Siwek <span dir="ltr">&lt;<a href="mailto:jsiwek@corelight.com" target="_blank">jsiwek@corelight.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Tue, Aug 14, 2018 at 10:26 PM Michael Dopheide &lt;<a href="mailto:dopheide@es.net">dopheide@es.net</a>&gt; wrote:<br>
&gt;<br>
&gt; Somehow related to Broker stores and/or casting.<br>
<br>
</span>You&#39;ll get a better error message/behavior now using:<br>
<br>
<a href="https://github.com/bro/bro/commit/f336c8c710bdeb41eb0aba88967ee90da24848b2" rel="noreferrer" target="_blank">https://github.com/bro/bro/<wbr>commit/<wbr>f336c8c710bdeb41eb0aba88967ee9<wbr>0da24848b2</a><br>
<br>
But ultimately, you likely want to do something like this patch:<br>
<br>
```<br>
--- known-hosts-with-dns.bro.orig 2018-08-15 11:07:41.000000000 -0500<br>
+++ known-hosts-with-dns.bro 2018-08-15 10:44:03.000000000 -0500<br>
@@ -113,7 +113,7 @@<br>
  for (ip in r$result as addr_set){<br>
  when ( local res = Broker::get(Known::host_store$<wbr>store,ip)){<br>
<br>
-     if(res?$result){<br>
+     if(res$status == Broker::SUCCESS){<br>
  @if ( ! Cluster::is_enabled() )<br>
  Known::hosts[ip] = fmt(&quot;%s&quot;,res$result as string);<br>
  @else<br>
```<br>
<br>
As for why some keys no longer exist in those lookups immediately<br>
after retrieving the full key set: my guess is they simply expired<br>
between those two points in time, but I didn&#39;t dig into it.  The main<br>
point would be to never assume the Broker::get() call succeeds, which<br>
was likely your intent, except &quot;res?$result&quot; is always true (another<br>
form of checking the data exists would be &quot;res$result?$data&quot;).<br>
<span class="HOEnZb"><font color="#888888"><br>
- Jon<br>
</font></span></blockquote></div><br></div>