If a specific NFS version is given as an option the set the probe flags to probe only that version. --- CHANGELOG | 1 + modules/mount_nfs.c | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 9639703..2499f1c 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -74,6 +74,7 @@ - fix syncronize handle_mounts() shutdown. - fix fix wildcard multi map regression. - improve timeout option description. +- only probe specific nfs version if requested. 25/07/2012 autofs-5.0.7 ======================= diff --git a/modules/mount_nfs.c b/modules/mount_nfs.c index adf2002..5a582ef 100644 --- a/modules/mount_nfs.c +++ b/modules/mount_nfs.c @@ -146,7 +146,15 @@ int mount_mount(struct autofs_point *ap, const char *root, const char *name, int if (strncmp("vers=4", cp, o_len) == 0 || strncmp("nfsvers=4", cp, o_len) == 0) vers = NFS4_VERS_MASK | TCP_SUPPORTED; - else if (strstr(cp, "port=") == cp && + else if (strncmp("vers=3", cp, o_len) == 0 || + strncmp("nfsvers=3", cp, o_len) == 0) { + vers &= ~(NFS4_VERS_MASK | NFS_VERS_MASK); + vers |= NFS3_REQUESTED; + } else if (strncmp("vers=2", cp, o_len) == 0 || + strncmp("nfsvers=2", cp, o_len) == 0) { + vers &= ~(NFS4_VERS_MASK | NFS_VERS_MASK); + vers |= NFS2_REQUESTED; + } else if (strstr(cp, "port=") == cp && o_len - 5 < 25) { char optport[25]; -- To unsubscribe from this list: send the line "unsubscribe autofs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html