aboutsummaryrefslogtreecommitdiffstats
path: root/reassemble.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2003-03-04 06:47:10 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2003-03-04 06:47:10 +0000
commitec068df9b6ca1c118d49dfae95509334219f3e13 (patch)
treead09573b7494a677e409713fff80f9bed96d8553 /reassemble.c
parent329ff554fe6782092b361bbced78e804f7313409 (diff)
When deciding whether we have enough data in a lower-level packet to
attempt reassembly of a higher-level packet that includes the lower-level packet, use "tvb_bytes_exist()" to check whether all the data that's to be included in the reassembly is available, rather than by checking whether the packet is short. Add some checks of that sort that were missing. Use the reported length of the packet when doing reassembly. Make the "iphdrlen" field of a "packet_info" structure be the length of the IP header in bytes, not in 4-byte words. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@7274 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'reassemble.c')
-rw-r--r--reassemble.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/reassemble.c b/reassemble.c
index c71a0fb421..5d6a4544ed 100644
--- a/reassemble.c
+++ b/reassemble.c
@@ -1,7 +1,7 @@
/* reassemble.c
* Routines for {fragment,segment} reassembly
*
- * $Id: reassemble.c,v 1.28 2002/12/19 11:22:38 sahlberg Exp $
+ * $Id: reassemble.c,v 1.29 2003/03/04 06:47:10 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -1084,8 +1084,8 @@ fragment_add_seq_check_work(tvbuff_t *tvb, int offset, packet_info *pinfo,
}
/*
- * If this is a short frame, then we can't, and don't, do
- * reassembly on it.
+ * If we don't have all the data that is in this fragment,
+ * then we can't, and don't, do reassembly on it.
*
* If it's the first frame, handle it as an unfragmented packet.
* Otherwise, just handle it as a fragment.
@@ -1093,7 +1093,7 @@ fragment_add_seq_check_work(tvbuff_t *tvb, int offset, packet_info *pinfo,
* If "more_frags" isn't set, we get rid of the entry in the
* hash table for this reassembly, as we don't need it any more.
*/
- if (tvb_reported_length(tvb) > tvb_length(tvb)) {
+ if (!tvb_bytes_exist(tvb, offset, frag_data_len)) {
if (!more_frags) {
/*
* Remove this from the table of in-progress