diff options
author | Guy Harris <guy@alum.mit.edu> | 2003-03-04 06:47:10 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2003-03-04 06:47:10 +0000 |
commit | 9db95664d104089e059e1110bd4936cb8375ff26 (patch) | |
tree | ad09573b7494a677e409713fff80f9bed96d8553 /packet-ipv6.c | |
parent | 9a57223addead8c42ff2c9b98c88aa68d5f670fe (diff) | |
download | wireshark-9db95664d104089e059e1110bd4936cb8375ff26.tar.gz wireshark-9db95664d104089e059e1110bd4936cb8375ff26.tar.bz2 wireshark-9db95664d104089e059e1110bd4936cb8375ff26.zip |
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.c | 4 |
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, |