Skip to content

Commit

Permalink
Fix non-deterministic logging of unmatched DNS msgs, addresses BIT-1153
Browse files Browse the repository at this point in the history
Unmatched DNS messages may fail to be logged sometimes due to a type of
iterator invalidation.
  • Loading branch information
jsiwek committed Mar 10, 2014
1 parent 69d52fe commit f30d3e6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions scripts/base/protocols/dns/main.bro
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,9 @@ function log_unmatched_msgs_queue(q: Queue::Queue)
function log_unmatched_msgs(msgs: PendingMessages)
{
for ( trans_id in msgs )
{
log_unmatched_msgs_queue(msgs[trans_id]);
delete msgs[trans_id];
}

msgs = PendingMessages();
}

function enqueue_new_msg(msgs: PendingMessages, id: count, msg: Info)
Expand Down

0 comments on commit f30d3e6

Please sign in to comment.