aboutsummaryrefslogtreecommitdiffstats
path: root/packet-smb-pipe.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2001-11-28 11:33:55 +0000
committerGuy Harris <guy@alum.mit.edu>2001-11-28 11:33:55 +0000
commit390d5bbb55afe74e2db5145691e826b77af6e301 (patch)
treee467dcfa9bcf64c46e3299c690dc9e38602e29be /packet-smb-pipe.c
parentce66d97e35ffc7e5614f50a6f04b23e8c2b20364 (diff)
If a request has already been processed, and we fail to find its
"smb_saved_info_t" in the table of requests whose replies have been found, don't look it up in the table of requests whose replies have not been found - if the request in question has no reply in the capture, that may find some later frame in the same conversation with the same MID, and we don't need that information anyway - the only reason we *need* that structure is to save information in it for use when processing its reply, and we already did that the first time we processed the request. (The information for the later frame may be bad, e.g. having a null "extra_info" pointer, or having one that points to information for another request.) Arrange that we don't use the pointer to the "smb_saved_info_t" when processing a request except to save information if the request hasn't already been processed, as that pointer may not be valid if the request has already been processed, as per the above. svn path=/trunk/; revision=4292
Diffstat (limited to 'packet-smb-pipe.c')
-rw-r--r--packet-smb-pipe.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/packet-smb-pipe.c b/packet-smb-pipe.c
index c914c8fe17..cd7c6d1596 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.57 2001/11/28 09:44:27 guy Exp $
+ * $Id: packet-smb-pipe.c,v 1.58 2001/11/28 11:33:54 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -2614,6 +2614,7 @@ dissect_pipe_smb(tvbuff_t *sp_tvb, tvbuff_t *s_tvb, tvbuff_t *pd_tvb,
proto_item *pipe_item = NULL;
proto_tree *pipe_tree = NULL;
int offset;
+ int trans_subcmd;
int function;
int fid = -1;
guint16 info_level;
@@ -2747,12 +2748,16 @@ dissect_pipe_smb(tvbuff_t *sp_tvb, tvbuff_t *s_tvb, tvbuff_t *pd_tvb,
if(smb_info->request){
if(strncmp(pipe,"LANMAN",6) == 0){
- tri->trans_subcmd=PIPE_LANMAN;
+ trans_subcmd=PIPE_LANMAN;
} else {
/* assume it is MSRPC*/
- tri->trans_subcmd=PIPE_MSRPC;
+ trans_subcmd=PIPE_MSRPC;
}
- }
+
+ if (!pinfo->fd->flags.visited)
+ tri->trans_subcmd = trans_subcmd;
+ } else
+ trans_subcmd = tri->trans_subcmd;
if (tri == NULL) {
/*
@@ -2766,7 +2771,7 @@ dissect_pipe_smb(tvbuff_t *sp_tvb, tvbuff_t *s_tvb, tvbuff_t *pd_tvb,
case CALL_NAMED_PIPE:
case TRANSACT_NM_PIPE:
- switch(tri->trans_subcmd){
+ switch(trans_subcmd){
case PIPE_LANMAN:
return dissect_pipe_lanman(pd_tvb, p_tvb, d_tvb, pinfo,
@@ -2792,7 +2797,7 @@ dissect_pipe_smb(tvbuff_t *sp_tvb, tvbuff_t *s_tvb, tvbuff_t *pd_tvb,
* We don't know the function; we dissect only LANMAN
* pipe messages, not RPC pipe messages, in that case.
*/
- switch(tri->trans_subcmd){
+ switch(trans_subcmd){
case PIPE_LANMAN:
return dissect_pipe_lanman(pd_tvb, p_tvb, d_tvb, pinfo,
tree);
@@ -2860,7 +2865,8 @@ dissect_pipe_smb(tvbuff_t *sp_tvb, tvbuff_t *s_tvb, tvbuff_t *pd_tvb,
proto_tree_add_uint(pipe_tree, hf_pipe_getinfo_info_level,
p_tvb, offset, 2, info_level);
offset += 2;
- tri->info_level = info_level;
+ if (!pinfo->fd->flags.visited)
+ tri->info_level = info_level;
} else {
guint8 pipe_namelen;