diff options
author | Uwe Girlich <Uwe.Girlich@philosys.de> | 2002-01-14 13:16:31 +0000 |
---|---|---|
committer | Uwe Girlich <Uwe.Girlich@philosys.de> | 2002-01-14 13:16:31 +0000 |
commit | 164e11c137fae76c1be9b485ed3a8b038b4104ef (patch) | |
tree | 0ea7bf11e3a325a62fb2fedc218034b4432ae571 /packet-nfs.c | |
parent | eebc0a4a6613a27729d42bd5393909948ae98621 (diff) | |
download | wireshark-164e11c137fae76c1be9b485ed3a8b038b4104ef.tar.gz wireshark-164e11c137fae76c1be9b485ed3a8b038b4104ef.tar.bz2 wireshark-164e11c137fae76c1be9b485ed3a8b038b4104ef.zip |
From Ronnie Sahlberg:
this fixes the bug that nfs name snooping did not work for nfs v2.
svn path=/trunk/; revision=4541
Diffstat (limited to 'packet-nfs.c')
-rw-r--r-- | packet-nfs.c | 36 |
1 files changed, 15 insertions, 21 deletions
diff --git a/packet-nfs.c b/packet-nfs.c index d42a7e61de..8dc8b85158 100644 --- a/packet-nfs.c +++ b/packet-nfs.c @@ -3,7 +3,7 @@ * Copyright 1999, Uwe Girlich <Uwe.Girlich@philosys.de> * Copyright 2000-2001, Mike Frisch <frisch@hummingbird.com> (NFSv4 decoding) * - * $Id: packet-nfs.c,v 1.62 2002/01/14 12:22:58 girlich Exp $ + * $Id: packet-nfs.c,v 1.63 2002/01/14 13:16:31 girlich Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -1263,24 +1263,6 @@ dissect_fhandle_data(tvbuff_t *tvb, int offset, packet_info *pinfo, { unsigned int fhtype = FHT_UNKNOWN; - if(nfs_file_name_snooping){ - if(!pinfo->fd->flags.visited){ - rpc_call_info_value *civ=pinfo->private_data; - - /* MOUNT v1,v2 MNT replies might give us a filehandle*/ - if( (civ->prog==100005) - &&(civ->proc==1) - &&((civ->vers==1)||(civ->vers==2)) - &&(!civ->request) - ) { - nfs_name_snoop_add_fh(civ->xid, tvb, - offset, fhlen); - } - } - - nfs_name_snoop_fh(pinfo, tree, tvb, offset, fhlen); - } - /* filehandle too long */ if (fhlen>64) goto type_ready; /* Not all bytes there. Any attempt to deduce the type would be @@ -1298,6 +1280,9 @@ dissect_fhandle_data(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree_add_uint(tree, hf_nfs_fh_hash, tvb, offset, fhlen, fhhash); } + if(nfs_file_name_snooping){ + nfs_name_snoop_fh(pinfo, tree, tvb, offset, fhlen); + } /* calculate (heuristically) fhtype */ switch (fhlen) { @@ -1598,10 +1583,19 @@ dissect_fhandle(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, nfs_name_snoop_add_fh(civ->xid, tvb, offset, 32); } + + /* MOUNT v1,v2 MNT replies might give us a filehandle*/ + if( (civ->prog==100005) + &&(civ->proc==1) + &&((civ->vers==1)||(civ->vers==2)) + &&(!civ->request) + ) { + nfs_name_snoop_add_fh(civ->xid, tvb, + offset, 32); + } } - if (ftree) - dissect_fhandle_data(tvb, offset, pinfo, ftree, FHSIZE); + dissect_fhandle_data(tvb, offset, pinfo, ftree, FHSIZE); offset += FHSIZE; return offset; |