mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 10:08:20 +00:00
Improve analysis of TCP SYN/SYN-ACK reversal situations.
- Since it's just the handshake packets out of order, they're no longer treated as partial connections, which some protocol analyzers immediately refuse to look at. - The TCP_Reassembler "is_orig" state failed to change, which led to protocol analyzers sometimes using the wrong value for that. - Add a unit test which exercises the Connection::FlipRoles() code path (i.e. the SYN/SYN-ACK reversal situation). Addresses BIT-1148.
This commit is contained in:
parent
063200c71a
commit
066473b1f1
7 changed files with 65 additions and 24 deletions
|
@ -95,9 +95,9 @@ void TCP_Analyzer::Done()
|
|||
void TCP_Analyzer::EnableReassembly()
|
||||
{
|
||||
SetReassembler(new TCP_Reassembler(this, this,
|
||||
TCP_Reassembler::Forward, true, orig),
|
||||
new TCP_Reassembler(this, this,
|
||||
TCP_Reassembler::Forward, false, resp));
|
||||
TCP_Reassembler::Forward, orig),
|
||||
new TCP_Reassembler(this, this,
|
||||
TCP_Reassembler::Forward, resp));
|
||||
|
||||
reassembling = 1;
|
||||
|
||||
|
@ -590,6 +590,7 @@ void TCP_Analyzer::UpdateInactiveState(double t,
|
|||
// per the discussion in IsReuse.
|
||||
// Flip the endpoints and establish
|
||||
// the connection.
|
||||
is_partial = 0;
|
||||
Conn()->FlipRoles();
|
||||
peer->SetState(TCP_ENDPOINT_ESTABLISHED);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue