<div dir="ltr">Awesome, thanks! <br><div>It worked.</div><div><br></div><div>Nabil</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Apr 22, 2020 at 10:52 PM Jon Siwek &lt;<a href="mailto:jsiwek@corelight.com">jsiwek@corelight.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Wed, Apr 22, 2020 at 12:15 AM Nabil Memon &lt;<a href="mailto:nabilmemon.ec@gmail.com" target="_blank">nabilmemon.ec@gmail.com</a>&gt; wrote:<br>
<br>
&gt; Stats gets updated in connection record after dns_end() event raised????<br>
<br>
Yes, the &quot;dns_end&quot; event and associated values can get<br>
created/enqueued before the states are updated.  However, the updated<br>
stats *are* technically available by the time the event gets<br>
dispatched, so one trick to refresh the connection record value would<br>
be to use &quot;lookup_connection()&quot;.  See if this helps:<br>
<br>
event dns_end(c: connection, msg: dns_msg)<br>
{<br>
c = lookup_connection(c$id);<br>
print &quot;dns_end: -------------------------------&quot;;<br>
print c$orig, c$resp, c$id, c$dns;<br>
print &quot;dns_end: -------------------------------&quot;;<br>
}<br>
<br>
- Jon<br>
</blockquote></div>