diff options
author | Ian Kent <raven@themaw.net> | 2017-06-15 19:23:07 +0800 |
---|---|---|
committer | Ian Kent <raven@themaw.net> | 2017-08-02 09:56:16 +0800 |
commit | fc485df691cdb9db0db21cf577fb36cae4b076f7 (patch) | |
tree | bc062e701707f95569c6953fbee6a57d4eb24aa7 /modules | |
parent | 288d921e2d94ce133793cbe186011d6f64c30ad8 (diff) | |
download | autofs-fc485df691cdb9db0db21cf577fb36cae4b076f7.tar.gz |
autofs-5.1.3 - fix incorrect status return in get_nfs_info()
If the host is unreachable getting the RPC client in get_nfs_info()
should set status to zero as response time taken hasn't been calculated.
Signed-off-by: Ian Kent <raven@themaw.net>
Diffstat (limited to 'modules')
-rw-r--r-- | modules/replicated.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/replicated.c b/modules/replicated.c index 315e3000..c5c4f392 100644 --- a/modules/replicated.c +++ b/modules/replicated.c @@ -605,9 +605,10 @@ static int get_supported_ver_and_cost(unsigned logopt, struct host *host, status = rpc_udp_getclient(&rpc_info, NFS_PROGRAM, vers); else status = rpc_tcp_getclient(&rpc_info, NFS_PROGRAM, vers); - if (status == -EHOSTUNREACH) + if (status == -EHOSTUNREACH) { + status = 0; goto done; - else if (!status) { + } else if (!status) { clock_gettime(CLOCK_MONOTONIC, &start); status = rpc_ping_proto(&rpc_info); clock_gettime(CLOCK_MONOTONIC, &end); |