aboutsummaryrefslogtreecommitdiffstats
path: root/packet-smb-pipe.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2003-03-05 07:17:50 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2003-03-05 07:17:50 +0000
commit772319fde0ed56418355d93a71edd3b7e60180f1 (patch)
treee20f09b7846e741997fb1b8469d5321879f09516 /packet-smb-pipe.c
parent2316ffdb45736c3cd41e2812425d4e4755be10fa (diff)
Use the reported length, not the captured length, as the fragment length
when doing reassembly. In some additional places, use "tvb_bytes_exist()" to check whether we have enough data to do reassembly, rather than checking to see if the frame is short (it might be short but we might still have enough data to do reassembly). In DCE RPC, use the fragment length from the header as the number of bytes of fragment data. There's no need to check "pinfo->fragmented" before doing reassembly in the DCERPC-over-SMB-pipes code - either we have all the data or we don't. In SNA and WTP reassembly, add a check to make sure we have all the data to be reassembled. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@7282 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-smb-pipe.c')
-rw-r--r--packet-smb-pipe.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/packet-smb-pipe.c b/packet-smb-pipe.c
index abafeaef95..db82e60077 100644
--- a/packet-smb-pipe.c
+++ b/packet-smb-pipe.c
@@ -8,7 +8,7 @@ XXX Fixme : shouldnt show [malformed frame] for long packets
* significant rewrite to tvbuffify the dissector, Ronnie Sahlberg and
* Guy Harris 2001
*
- * $Id: packet-smb-pipe.c,v 1.88 2003/02/28 03:00:59 guy Exp $
+ * $Id: packet-smb-pipe.c,v 1.89 2003/03/05 07:17:50 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -3203,6 +3203,7 @@ dissect_pipe_dcerpc(tvbuff_t *d_tvb, packet_info *pinfo, proto_tree *parent_tree
smb_info_t *smb_priv = (smb_info_t *)pinfo->private_data;
gboolean result;
gboolean save_fragmented;
+ guint reported_len;
dcerpc_priv.transport_type = DCERPC_TRANSPORT_SMB;
dcerpc_priv.data.smb.fid = fid;
@@ -3210,15 +3211,14 @@ dissect_pipe_dcerpc(tvbuff_t *d_tvb, packet_info *pinfo, proto_tree *parent_tree
pinfo->private_data = &dcerpc_priv;
/*
- * Offer desegmentation service to DCERPC if this packet
- * isn't fragmented or short. Otherwise, reassembly is
- * (probably) impossible.
+ * Offer desegmentation service to DCERPC if we have all the
+ * data. Otherwise, reassembly is (probably) impossible.
*/
pinfo->can_desegment=0;
pinfo->desegment_offset = 0;
pinfo->desegment_len = 0;
- if(smb_dcerpc_reassembly && !pinfo->fragmented &&
- tvb_length(d_tvb) >= tvb_reported_length(d_tvb)){
+ reported_len = tvb_reported_length(d_tvb);
+ if(smb_dcerpc_reassembly && tvb_bytes_exist(d_tvb, 0, reported_len)){
pinfo->can_desegment=2;
}
@@ -3255,10 +3255,10 @@ dissect_pipe_dcerpc(tvbuff_t *d_tvb, packet_info *pinfo, proto_tree *parent_tree
if(smb_dcerpc_reassembly && !pinfo->fd->flags.visited && pinfo->desegment_len){
fragment_add(d_tvb, 0, pinfo, pinfo->fd->num,
dcerpc_fragment_table,
- 0, tvb_length(d_tvb), TRUE);
+ 0, reported_len, TRUE);
fragment_set_tot_len(pinfo, pinfo->fd->num,
dcerpc_fragment_table,
- pinfo->desegment_len+tvb_length(d_tvb));
+ pinfo->desegment_len+reported_len);
/* since the other fragments are in normal ReadAndX and WriteAndX calls
we must make sure we can map FID values to this defragmentation
session */