Adding a weird for when truncated packets lead TCP reassembly to

ignore content.

(Private test suite has a bunch of test cases.)
This commit is contained in:
Robin Sommer 2015-07-03 10:40:21 -07:00
parent de3932bc42
commit 85b433b13f
3 changed files with 14 additions and 4 deletions

View file

@ -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 2.4-19 | 2015-07-03 09:04:54 -0700
* A set of tests exercising IP defragmentation and TCP reassembly. * A set of tests exercising IP defragmentation and TCP reassembly.

View file

@ -1 +1 @@
2.4-19 2.4-20

View file

@ -201,8 +201,13 @@ int TCP_Endpoint::DataSent(double t, uint64 seq, int len, int caplen,
{ {
int status = 0; int status = 0;
if ( contents_processor && caplen >= len ) if ( contents_processor )
status = contents_processor->DataSent(t, seq, len, data); {
if ( caplen >= len )
status = contents_processor->DataSent(t, seq, len, data);
else
TCP()->Weird("truncated_tcp_payload");
}
if ( caplen <= 0 ) if ( caplen <= 0 )
return status; return status;