aboutsummaryrefslogtreecommitdiffstats
path: root/packet-wtp.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-wtp.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-wtp.c')
-rw-r--r--packet-wtp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/packet-wtp.c b/packet-wtp.c
index 88c955ee1b..3fd9078f36 100644
--- a/packet-wtp.c
+++ b/packet-wtp.c
@@ -2,7 +2,7 @@
*
* Routines to dissect WTP component of WAP traffic.
*
- * $Id: packet-wtp.c,v 1.24 2002/01/04 20:20:08 guy Exp $
+ * $Id: packet-wtp.c,v 1.25 2002/01/17 06:29:17 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -510,10 +510,12 @@ dissect_wtp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
int dataOffset = offCur + cbHeader + vHeader;
guint32 dataLen = tvb_length_remaining(tvb, offCur + cbHeader + vHeader);
+ gboolean save_fragmented;
if ((pdut == SEGMENTED_INVOKE) || (pdut == SEGMENTED_RESULT) ||
(((pdut == INVOKE) || (pdut == RESULT)) && (!fTTR))) /* 1st part of segment */
{
+ save_fragmented = pinfo->fragmented;
pinfo->fragmented = TRUE;
fd_head = fragment_add_seq(tvb, dataOffset, pinfo, TID,
wtp_fragment_table, psn, dataLen, !fTTR);
@@ -533,6 +535,7 @@ dissect_wtp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (check_col(pinfo->cinfo, COL_INFO)) /* Won't call WSP so display */
col_append_str(pinfo->cinfo, COL_INFO, szInfo );
}
+ pinfo->fragmented = save_fragmented;
}
else /* Normal packet, call next dissector */
{