autofs-5.0.6 - fix nfs4 contacts portmap From: Ian Kent <ikent@redhat.com> When an fstype of nfs4 is specified probing the server for availability should not need to contact the portmapper, it should use either the port specified by the port= option or use port 2049. However, in function modules/replicated.c:get_nfs_info() a check for the port= option, and subsequent portmap lookup when not it's not present, is done before the check for whether nfsv3 is to be checked at all. Oops! --- CHANGELOG | 1 + modules/replicated.c | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 2e08ffa..182bc79 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -53,6 +53,7 @@ - fix initialization in rpc create_client(). - fix libtirpc name clash. - check if /etc/mtab is a link to /proc/self/mounts. +- fix nfs4 contacts portmap. 28/06/2011 autofs-5.0.6 ----------------------- diff --git a/modules/replicated.c b/modules/replicated.c index 10e1429..09350c5 100644 --- a/modules/replicated.c +++ b/modules/replicated.c @@ -589,6 +589,9 @@ static unsigned int get_nfs_info(unsigned logopt, struct host *host, } v3_ver: + if (!(version & NFS3_REQUESTED)) + goto v2_ver; + if (!have_port_opt) { status = rpc_portmap_getclient(pm_info, host->name, host->addr, host->addr_len, @@ -600,9 +603,6 @@ v3_ver: goto done_ver; } - if (!(version & NFS3_REQUESTED)) - goto v2_ver; - if (have_port_opt) { if (!(rpc_info->port = get_port_option(options))) goto done_ver;