Skip to content

Commit

Permalink
Adding a weird for when truncated packets lead TCP reassembly to
Browse files Browse the repository at this point in the history
ignore content.

(Private test suite has a bunch of test cases.)
  • Loading branch information
rsmmr committed Jul 3, 2015
1 parent de3932b commit 85b433b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGES
@@ -1,4 +1,9 @@

2.4-20 | 2015-07-03 10:40:21 -0700

* Adding a weird for when truncated packets lead TCP reassembly to
ignore content. (Robin Sommer)

2.4-19 | 2015-07-03 09:04:54 -0700

* A set of tests exercising IP defragmentation and TCP reassembly.
Expand Down
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
2.4-19
2.4-20
11 changes: 8 additions & 3 deletions src/analyzer/protocol/tcp/TCP_Endpoint.cc
Expand Up @@ -201,13 +201,18 @@ int TCP_Endpoint::DataSent(double t, uint64 seq, int len, int caplen,
{
int status = 0;

if ( contents_processor && caplen >= len )
status = contents_processor->DataSent(t, seq, len, data);
if ( contents_processor )
{
if ( caplen >= len )
status = contents_processor->DataSent(t, seq, len, data);
else
TCP()->Weird("truncated_tcp_payload");
}

if ( caplen <= 0 )
return status;

if ( contents_file && ! contents_processor &&
if ( contents_file && ! contents_processor &&
seq + len > contents_start_seq )
{
int64 under_seq = contents_start_seq - seq;
Expand Down

0 comments on commit 85b433b

Please sign in to comment.