diff options
author | Michael Mann <mmann78@netscape.net> | 2013-11-07 04:50:53 +0000 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2013-11-07 04:50:53 +0000 |
commit | 21ddc7ae4e7c0ac2508dab4a0ca3a3d248e7b0f5 (patch) | |
tree | 3d93d23bf9d467f8b6a70e3a49baa316063f15e1 /epan/reassemble.c | |
parent | b9e36145f47dd9fe1cc6a754e34d4442d4f72d5c (diff) |
Revert r53118 as it breaks reassemble_test.
svn path=/trunk/; revision=53130
Diffstat (limited to 'epan/reassemble.c')
-rw-r--r-- | epan/reassemble.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/epan/reassemble.c b/epan/reassemble.c index 87319c1db1..5b5426b4c1 100644 --- a/epan/reassemble.c +++ b/epan/reassemble.c @@ -1630,7 +1630,7 @@ fragment_add_seq_work(fragment_head *fd_head, tvbuff_t *tvb, const int offset, * sequence number of that fragment (which is NOT * the length of the packet!) */ - fd_head->datalen = fd->offset + fd->len; + fd_head->datalen = fd->offset; fd_head->flags |= FD_DATALEN_SET; } } @@ -1753,18 +1753,18 @@ fragment_add_seq_work(fragment_head *fd_head, tvbuff_t *tvb, const int offset, max = 0; for(fd_i=fd_head->next;fd_i;fd_i=fd_i->next) { if ( fd_i->offset==max ){ - max += fd_i->len; + max++; } } /* max will now be datalen+1 if all fragments have been seen */ - if (max < fd_head->datalen) { + if (max <= fd_head->datalen) { /* we have not received all packets yet */ return FALSE; } - if (max > fd_head->datalen) { + if (max > (fd_head->datalen+1)) { /* oops, too long fragment detected */ fd->flags |= FD_TOOLONGFRAGMENT; fd_head->flags |= FD_TOOLONGFRAGMENT; @@ -1866,7 +1866,7 @@ fragment_add_seq_common(reassembly_table *table, tvbuff_t *tvb, */ for (fd = fd_head; fd != NULL; fd = fd->next) { if (fd->next == NULL) - frag_number = fd->offset + fd->len; + frag_number = fd->offset + 1; } } } |