aboutsummaryrefslogtreecommitdiffstats
path: root/packet-ipv6.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2002-01-17 06:29:20 +0000
committerGuy Harris <guy@alum.mit.edu>2002-01-17 06:29:20 +0000
commitfb1e26fe6a6d333572cd7d448c6a9c58fd81dbd0 (patch)
treef6dbae5975632b7bd27fb2dce6383b13a22cb2c2 /packet-ipv6.c
parent28d7063364ee6aa870ef916d781f7de6deadbd21 (diff)
Use the "fragmented" field of the "packet_info" structure in
"dissect_frame()" to indicate whether a ReportedBoundsError was due to the packet being malformed (i.e., the packet was shorter than it's supposed to be, so the dissector went past the end trying to extract fields that were supposed to be there) or due to it not being reassembled (i.e., the packet was fragmented, and we didn't reassemble it, but just treated the first fragment as the entire packet, so the dissector went past the end trying to extract fields that were partially or completely in fragments after that). Mark the latter as being unreasembled rather than malformed. Properly initialize, save, and restore that field, and properly set it, so that works. svn path=/trunk/; revision=4555
Diffstat (limited to 'packet-ipv6.c')
-rw-r--r--packet-ipv6.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/packet-ipv6.c b/packet-ipv6.c
index 42c15a9d94..563f0d60be 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.72 2002/01/10 11:27:56 guy Exp $
+ * $Id: packet-ipv6.c,v 1.73 2002/01/17 06:29:16 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -657,6 +657,7 @@ dissect_ipv6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
fragment_data *ipfd_head;
tvbuff_t *next_tvb;
gboolean update_col_info = TRUE;
+ gboolean save_fragmented;
struct ip6_hdr ipv6;
@@ -809,6 +810,7 @@ again:
/* If ipv6_reassemble is on and this is a fragment, then just add the fragment
* to the hashtable.
*/
+ save_fragmented = pinfo->fragmented;
if (ipv6_reassemble && frag) {
/* We're reassembling, and this is part of a fragmented datagram.
Add the fragment to the hash table if the frame isn't truncated. */
@@ -946,6 +948,7 @@ again:
/* As we haven't reassembled anything, we haven't changed "pi", so
we don't have to restore it. */
+ pinfo->fragmented = save_fragmented;
return;
}
@@ -956,6 +959,7 @@ again:
col_add_fstr(pinfo->cinfo, COL_INFO, "%s (0x%02x)", ipprotostr(nxt),nxt);
call_dissector(data_handle,next_tvb, pinfo, tree);
}
+ pinfo->fragmented = save_fragmented;
}
static void