[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freebsd-commits-all
Subject:    svn commit: r201345 - head/sys/fs/nfsclient
From:       Rick Macklem <rmacklem () freebsd ! org>
Date:       2009-12-31 18:02:48
Message-ID: 200912311802.nBVI2mPk067944 () svn ! freebsd ! org
[Download RAW message or body]

Author: rmacklem
Date: Thu Dec 31 18:02:48 2009
New Revision: 201345
URL: http://svn.freebsd.org/changeset/base/201345

Log:
  Fix the experimental NFS client so that it can create Unix
  domain sockets on an NFSv4 mount point. It was generating
  incorrect XDR in the request for this case.
  
  Tested by:	infofarmer
  MFC after:	2 weeks

Modified:
  head/sys/fs/nfsclient/nfs_clrpcops.c

Modified: head/sys/fs/nfsclient/nfs_clrpcops.c
==============================================================================
--- head/sys/fs/nfsclient/nfs_clrpcops.c	Thu Dec 31 17:44:24 2009	(r201344)
+++ head/sys/fs/nfsclient/nfs_clrpcops.c	Thu Dec 31 18:02:48 2009	(r201345)
@@ -1626,10 +1626,15 @@ nfsrpc_mknod(vnode_t dvp, char *name, in
 		return (ENAMETOOLONG);
 	NFSCL_REQSTART(nd, NFSPROC_MKNOD, dvp);
 	if (nd->nd_flag & ND_NFSV4) {
-		NFSM_BUILD(tl, u_int32_t *, 3 * NFSX_UNSIGNED);
-		*tl++ = vtonfsv34_type(vtyp);
-		*tl++ = txdr_unsigned(NFSMAJOR(rdev));
-		*tl = txdr_unsigned(NFSMINOR(rdev));
+		if (vtyp == VBLK || vtyp == VCHR) {
+			NFSM_BUILD(tl, u_int32_t *, 3 * NFSX_UNSIGNED);
+			*tl++ = vtonfsv34_type(vtyp);
+			*tl++ = txdr_unsigned(NFSMAJOR(rdev));
+			*tl = txdr_unsigned(NFSMINOR(rdev));
+		} else {
+			NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED);
+			*tl = vtonfsv34_type(vtyp);
+		}
 	}
 	(void) nfsm_strtom(nd, name, namelen);
 	if (nd->nd_flag & ND_NFSV3) {
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic