Ethereal-dev: [Ethereal-dev] NFSv4 SETATTR patch

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Mike Frisch <mfrisch@xxxxxxxxxxxxxxx>
Date: Tue, 6 Mar 2001 13:22:16 -0500
This patch fixes a decoding problem with failed NFSv4 SETATTR operations.

--- cut here ---

Index: packet-nfs.c
===================================================================
RCS file: /cvsroot/ethereal/packet-nfs.c,v
retrieving revision 1.48
diff -u -r1.48 packet-nfs.c
--- packet-nfs.c	2001/03/02 21:54:02	1.48
+++ packet-nfs.c	2001/03/06 18:19:34
@@ -5288,8 +5288,14 @@
 
 		offset = dissect_nfs_nfsstat4(pd, offset, fd, newftree, &status);
 
-		if (status != NFS4_OK && 
-			(opcode != NFS4_OP_LOCK || opcode != NFS4_OP_LOCKT))
+		/*
+		 * With the exception of NFS4_OP_LOCK, NFS4_OP_LOCKT, and 
+		 * NFS4_OP_SETATTR, all other ops do *not* return data with the
+		 * failed status code.
+		 */
+		if ((status != NFS4_OK) &&
+			((opcode != NFS4_OP_LOCK) && (opcode != NFS4_OP_LOCKT) &&
+			(opcode != NFS4_OP_SETATTR)))
 			continue;
 
 		/* These parsing routines are only executed if the status is NFS4_OK */