Wireshark-dev: [Wireshark-dev] [PATCH 03/16] NFS: Remove broken NFSv4 filename snooping

From: Pali Rohár <pali@xxxxxxxxxx>
Date: Fri, 13 Sep 2024 23:08:38 +0200
It does nothing because dissect_nfs4_request_op() calls
nfs_name_snoop_add_name() with name_length=0 which is ignored.
---
 epan/dissectors/packet-nfs.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/epan/dissectors/packet-nfs.c b/epan/dissectors/packet-nfs.c
index b10bf5d4f9b1..519005e7e9f9 100644
--- a/epan/dissectors/packet-nfs.c
+++ b/epan/dissectors/packet-nfs.c
@@ -3860,7 +3860,6 @@ dissect_nfs3_fh(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree,
 		  &&((civ->vers == 3)
 		  &&(!civ->request)
 		  &&((civ->proc == 3)||(civ->proc == 8)||(civ->proc == 9)||(civ->proc == 10)||(civ->proc == 11))))
-		|| civ->vers == 4
 		) {
 			fh_length = tvb_get_ntohl(tvb, offset);
 			fh_offset = offset+4;
@@ -10251,12 +10250,6 @@ dissect_nfs4_request_op(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tre
 		case NFS4_OP_LOOKUP:
 			/*name_offset = offset;*/
 			offset = dissect_nfs_utf8string(tvb, offset, newftree, hf_nfs4_component, &name);
-			if (nfs_file_name_snooping) {
-				nfs_name_snoop_add_name(civ->xid, tvb,
-										/*name_offset, strlen(name), */
-										0, 0,
-										0, 0, name);
-			}
 			wmem_strbuf_append_printf (op_summary[ops_counter].optext, " ");
 			if (last_fh_hash != 0)
 				wmem_strbuf_append_printf (op_summary[ops_counter].optext, "DH: 0x%08x/", last_fh_hash);
-- 
2.20.1