Author: rmacklem
Date: Thu Jan 14 17:35:07 2010
New Revision: 202292
URL: http://svn.freebsd.org/changeset/base/202292

Log:
  MFC: r201345
  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

Modified:
  stable/8/sys/fs/nfsclient/nfs_clrpcops.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/fs/nfsclient/nfs_clrpcops.c
==============================================================================
--- stable/8/sys/fs/nfsclient/nfs_clrpcops.c    Thu Jan 14 17:30:13 2010        
(r202291)
+++ stable/8/sys/fs/nfsclient/nfs_clrpcops.c    Thu Jan 14 17:35:07 2010        
(r202292)
@@ -1633,10 +1633,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-unsubscr...@freebsd.org"

Reply via email to