mirror of
https://github.com/zeek/zeek.git
synced 2025-10-08 17:48:21 +00:00
Fix duplication of new_connection_contents event
Addresses BIT-1602
This commit is contained in:
parent
4851cbc7cc
commit
d091e9ca89
3 changed files with 12 additions and 8 deletions
|
@ -408,11 +408,6 @@ void TCP_Analyzer::EnableReassembly()
|
|||
TCP_Reassembler::Forward, orig),
|
||||
new TCP_Reassembler(this, this,
|
||||
TCP_Reassembler::Forward, resp));
|
||||
|
||||
reassembling = 1;
|
||||
|
||||
if ( new_connection_contents )
|
||||
Event(new_connection_contents);
|
||||
}
|
||||
|
||||
void TCP_Analyzer::SetReassembler(TCP_Reassembler* rorig,
|
||||
|
@ -423,10 +418,10 @@ void TCP_Analyzer::SetReassembler(TCP_Reassembler* rorig,
|
|||
resp->AddReassembler(rresp);
|
||||
rresp->SetDstAnalyzer(this);
|
||||
|
||||
reassembling = 1;
|
||||
|
||||
if ( new_connection_contents )
|
||||
if ( new_connection_contents && reassembling == 0 )
|
||||
Event(new_connection_contents);
|
||||
|
||||
reassembling = 1;
|
||||
}
|
||||
|
||||
const struct tcphdr* TCP_Analyzer::ExtractTCP_Header(const u_char*& data,
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
new_connection_contents for [orig_h=192.168.1.77, orig_p=57640/tcp, resp_h=66.198.80.67, resp_p=6667/tcp]
|
||||
new_connection_contents for [orig_h=192.168.1.77, orig_p=57655/tcp, resp_h=209.197.168.151, resp_p=1024/tcp]
|
|
@ -0,0 +1,7 @@
|
|||
# @TEST-EXEC: bro -r $TRACES/irc-dcc-send.trace %INPUT
|
||||
# @TEST-EXEC: btest-diff .stdout
|
||||
|
||||
event new_connection_contents(c: connection)
|
||||
{
|
||||
print fmt("new_connection_contents for %s", cat(c$id));
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue