diff -urN util-linux-2.12r/mount/nfs_mount4.h util-linux-2.12r.ben/mount/nfs_mount4.h --- util-linux-2.12r/mount/nfs_mount4.h 2000-10-14 07:20:51.000000000 -0700 +++ util-linux-2.12r.ben/mount/nfs_mount4.h 2006-01-19 18:49:16.000000000 -0800 @@ -8,7 +8,8 @@ * so it is easiest to ignore the kernel altogether (at compile time). */ -#define NFS_MOUNT_VERSION 4 +#define NFS_MOUNT_VERSION 7 +#define NFS_MAX_CONTEXT_LEN 256 struct nfs2_fh { char data[32]; @@ -36,6 +37,10 @@ int namlen; /* 2 */ unsigned int bsize; /* 3 */ struct nfs3_fh root; /* 4 */ + int pseudoflavor; /* 5 */ + char context[NFS_MAX_CONTEXT_LEN + 1]; /* 6 */ + char pad[3]; /* 7 Align the context above */ + unsigned int local_ip; /* 7 */ }; /* bits in the flags field */ diff -urN util-linux-2.12r/mount/nfsmount.c util-linux-2.12r.ben/mount/nfsmount.c --- util-linux-2.12r/mount/nfsmount.c 2002-04-05 03:35:53.000000000 -0800 +++ util-linux-2.12r.ben/mount/nfsmount.c 2006-01-19 19:38:25.000000000 -0800 @@ -72,6 +72,10 @@ #define NFS_FHSIZE 32 #endif +/* To disable debugging, comment this out. */ +/* #define NFS_MOUNT_DEBUG 1 */ + + static char *nfs_strerror(int stat); #define MAKE_VERSION(p,q,r) (65536*(p) + 256*(q) + (r)) @@ -119,8 +123,10 @@ nfs_mount_version = 4; /* since 2.2.18pre9 */ else if (kernel_version < MAKE_VERSION(2,3,99)) nfs_mount_version = 3; + else if (kernel_version < MAKE_VERSION(2,6,15)) + nfs_mount_version = 4; else - nfs_mount_version = 4; /* since 2.3.99pre4 */ + nfs_mount_version = 7; /* local_addr hack */ } if (nfs_mount_version > NFS_MOUNT_VERSION) nfs_mount_version = NFS_MOUNT_VERSION; @@ -387,8 +393,11 @@ else #endif printf(_("Warning: Option namlen is not supported.\n")); + } else if (!strcmp(opt, "local_ip")) { + data.local_ip = inet_addr(opteq+1); + printf("Using local_ip: 0x%x\n", data.local_ip); } else if (!strcmp(opt, "addr")) { - /* ignore */; + /* ignore */ } else { printf(_("unknown nfs mount parameter: " "%s=%d\n"), opt, val); @@ -477,8 +486,8 @@ data.rsize, data.wsize, data.timeo, data.retrans); printf("acreg (min, max) = (%d, %d), acdir (min, max) = (%d, %d)\n", data.acregmin, data.acregmax, data.acdirmin, data.acdirmax); - printf("port = %d, bg = %d, retry = %d, flags = %.8x\n", - port, bg, retry, data.flags); + printf("version: %d port = %d, bg = %d, retry = %d, flags = %.8x\n", + nfs_mount_version, port, bg, retry, data.flags); printf("mountprog = %d, mountvers = %d, nfsprog = %d, nfsvers = %d\n", mountprog, mountvers, nfsprog, nfsvers); printf("soft = %d, intr = %d, posix = %d, nocto = %d, noac = %d\n",