|
|
306fa1 |
autofs-5.0.7 - only probe specific nfs version when requested
|
|
|
306fa1 |
|
|
|
306fa1 |
From: Ian Kent <raven@themaw.net>
|
|
|
306fa1 |
|
|
|
306fa1 |
If a specific NFS version is given as an option the set the probe flags
|
|
|
306fa1 |
to probe only that version.
|
|
|
306fa1 |
---
|
|
|
306fa1 |
CHANGELOG | 1 +
|
|
|
306fa1 |
modules/mount_nfs.c | 10 +++++++++-
|
|
|
306fa1 |
2 files changed, 10 insertions(+), 1 deletion(-)
|
|
|
306fa1 |
|
|
|
306fa1 |
--- autofs-5.0.7.orig/CHANGELOG
|
|
|
306fa1 |
+++ autofs-5.0.7/CHANGELOG
|
|
|
306fa1 |
@@ -63,6 +63,7 @@
|
|
|
306fa1 |
- teach dumpmaps to output simple key value pairs.
|
|
|
306fa1 |
- fix get_nfs_info() probe.
|
|
|
306fa1 |
- fix portmap lookup.
|
|
|
306fa1 |
+- only probe specific nfs version if requested.
|
|
|
306fa1 |
|
|
|
306fa1 |
25/07/2012 autofs-5.0.7
|
|
|
306fa1 |
=======================
|
|
|
306fa1 |
--- autofs-5.0.7.orig/modules/mount_nfs.c
|
|
|
306fa1 |
+++ autofs-5.0.7/modules/mount_nfs.c
|
|
|
306fa1 |
@@ -146,7 +146,15 @@ int mount_mount(struct autofs_point *ap,
|
|
|
306fa1 |
if (strncmp("vers=4", cp, o_len) == 0 ||
|
|
|
306fa1 |
strncmp("nfsvers=4", cp, o_len) == 0)
|
|
|
306fa1 |
vers = NFS4_VERS_MASK | TCP_SUPPORTED;
|
|
|
306fa1 |
- else if (strstr(cp, "port=") == cp &&
|
|
|
306fa1 |
+ else if (strncmp("vers=3", cp, o_len) == 0 ||
|
|
|
306fa1 |
+ strncmp("nfsvers=3", cp, o_len) == 0) {
|
|
|
306fa1 |
+ vers &= ~(NFS4_VERS_MASK | NFS_VERS_MASK);
|
|
|
306fa1 |
+ vers |= NFS3_REQUESTED;
|
|
|
306fa1 |
+ } else if (strncmp("vers=2", cp, o_len) == 0 ||
|
|
|
306fa1 |
+ strncmp("nfsvers=2", cp, o_len) == 0) {
|
|
|
306fa1 |
+ vers &= ~(NFS4_VERS_MASK | NFS_VERS_MASK);
|
|
|
306fa1 |
+ vers |= NFS2_REQUESTED;
|
|
|
306fa1 |
+ } else if (strstr(cp, "port=") == cp &&
|
|
|
306fa1 |
o_len - 5 < 25) {
|
|
|
306fa1 |
char optport[25];
|
|
|
306fa1 |
|