aboutsummaryrefslogtreecommitdiffstats
path: root/packet-ipv6.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2003-03-04 06:47:10 +0000
committerGuy Harris <guy@alum.mit.edu>2003-03-04 06:47:10 +0000
commit9db95664d104089e059e1110bd4936cb8375ff26 (patch)
treead09573b7494a677e409713fff80f9bed96d8553 /packet-ipv6.c
parent9a57223addead8c42ff2c9b98c88aa68d5f670fe (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. svn path=/trunk/; revision=7274
Diffstat (limited to 'packet-ipv6.c')
-rw-r--r--packet-ipv6.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/packet-ipv6.c b/packet-ipv6.c
index b5b0bf20bc..dad07e1a61 100644
--- a/packet-ipv6.c
+++ b/packet-ipv6.c
@@ -1,7 +1,7 @@
/* packet-ipv6.c
* Routines for IPv6 packet disassembly
*
- * $Id: packet-ipv6.c,v 1.93 2003/02/04 20:16:57 guy Exp $
+ * $Id: packet-ipv6.c,v 1.94 2003/03/04 06:47:10 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -635,7 +635,7 @@ again:
* in the fragment, then just add the fragment to the hashtable.
*/
save_fragmented = pinfo->fragmented;
- if (ipv6_reassemble && frag && tvb_reported_length(tvb) <= tvb_length(tvb)) {
+ if (ipv6_reassemble && frag && tvb_bytes_exist(tvb, offset, plen)) {
ipfd_head = fragment_add(tvb, offset, pinfo, ident,
ipv6_fragment_table,
offlg & IP6F_OFF_MASK,