Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Jul 2018 21:02:45 +0000 (UTC)
From:      Rick Macklem <rmacklem@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r337006 - stable/10/sys/fs/nfsserver
Message-ID:  <201807312102.w6VL2jDa038022@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rmacklem
Date: Tue Jul 31 21:02:45 2018
New Revision: 337006
URL: https://svnweb.freebsd.org/changeset/base/337006

Log:
  MFC: r336215
  Ignore the cookie verifier for NFSv4.1 when the cookie is 0.
  
  RFC5661 states that the cookie verifier should be 0 when the cookie is 0.
  However, the wording is somewhat unclear and a recent discussion on the
  nfsv4@ietf.org mailing list indicated that the NFSv4 server should ignore
  the cookie verifier's value when the dirctory offset cookie is 0.
  This patch deletes the check for this that would return NFSERR_BAD_COOKIE
  when the verifier was not 0.
  This was found during testing of the ESXi client against the NFSv4.1 server.

Modified:
  stable/10/sys/fs/nfsserver/nfs_nfsdport.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/fs/nfsserver/nfs_nfsdport.c
==============================================================================
--- stable/10/sys/fs/nfsserver/nfs_nfsdport.c	Tue Jul 31 20:57:31 2018	(r337005)
+++ stable/10/sys/fs/nfsserver/nfs_nfsdport.c	Tue Jul 31 21:02:45 2018	(r337006)
@@ -1871,6 +1871,7 @@ nfsrvd_readdirplus(struct nfsrv_descript *nd, int isdg
 	}
 	fullsiz = siz;
 	nd->nd_repstat = getret = nfsvno_getattr(vp, &at, nd->nd_cred, p, 1);
+#if 0
 	if (!nd->nd_repstat) {
 	    if (off && verf != at.na_filerev) {
 		/*
@@ -1879,17 +1880,14 @@ nfsrvd_readdirplus(struct nfsrv_descript *nd, int isdg
 		 * removed/added unless that offset cookies returned to
 		 * the client are no longer valid.
 		 */
-#if 0
 		if (nd->nd_flag & ND_NFSV4) {
 			nd->nd_repstat = NFSERR_NOTSAME;
 		} else {
 			nd->nd_repstat = NFSERR_BAD_COOKIE;
 		}
-#endif
-	    } else if ((nd->nd_flag & ND_NFSV4) && off == 0 && verf != 0) {
-		nd->nd_repstat = NFSERR_BAD_COOKIE;
 	    }
 	}
+#endif
 	if (!nd->nd_repstat && vp->v_type != VDIR)
 		nd->nd_repstat = NFSERR_NOTDIR;
 	if (!nd->nd_repstat && cnt == 0)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201807312102.w6VL2jDa038022>