aboutsummaryrefslogtreecommitdiffstats
path: root/epan/reassemble.c
diff options
context:
space:
mode:
authorEvan Huus <eapache@gmail.com>2013-09-07 18:20:52 +0000
committerEvan Huus <eapache@gmail.com>2013-09-07 18:20:52 +0000
commit9fd46c37a89dce1de754087bbc1154c5593108b0 (patch)
treeb0fcc2a31e3345178e2cab84bb08d448bb251749 /epan/reassemble.c
parent6a4364bb40a1b2c6a164d31d7ef9de6321a940ba (diff)
- no need for a doubly-linked list of TVBs, single is simpler
- support merging chains in tvb_add_to_chain - when we have an old reassembled TVB, just merge the chains rather than freeing it (we may still need it as it may already be a data source) - modelines Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9027 #BACKPORT, but it's gonna be messy... svn path=/trunk/; revision=51825
Diffstat (limited to 'epan/reassemble.c')
-rw-r--r--epan/reassemble.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/epan/reassemble.c b/epan/reassemble.c
index 954f04d781..65912ffce0 100644
--- a/epan/reassemble.c
+++ b/epan/reassemble.c
@@ -30,6 +30,8 @@
#include <epan/reassemble.h>
+#include <epan/tvbuff-int.h>
+
/*
* Functions for reassembly tables where the endpoint addresses, and a
* fragment ID, are used as the key.
@@ -1183,7 +1185,7 @@ fragment_add_work(fragment_head *fd_head, tvbuff_t *tvb, const int offset,
}
if (old_tvb_data)
- tvb_free(old_tvb_data);
+ tvb_add_to_chain(tvb, old_tvb_data);
/* mark this packet as defragmented.
allows us to skip any trailing fragments */
fd_head->flags |= FD_DEFRAGMENTED;