diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2009-07-14 16:27:54 -0400 |
---|---|---|
committer | Steve Dickson <steved@redhat.com> | 2009-07-14 16:27:54 -0400 |
commit | 682a9855b93a7d3545a26eea39a0895b9757cdcb (patch) | |
tree | 999b8536557e7a58ed5a8613009fbb43f5ff6564 /support | |
parent | aa633adcbe63b7539d23d7e0fb1342659cf22953 (diff) | |
download | nfs-utils-682a9855b93a7d3545a26eea39a0895b9757cdcb.tar.gz nfs-utils-682a9855b93a7d3545a26eea39a0895b9757cdcb.tar.xz nfs-utils-682a9855b93a7d3545a26eea39a0895b9757cdcb.zip |
getport: Convert TCP connection refused to RPC_CANTRECV
In a similar vein to the timeout logic we just restored, a refused
TCP connection should be mapped to an equivalent UDP error code:
RPC_CANTRECV.
This is new behavior for TCP connections; the legacy mount command
appears to have simply failed immediately if a TCP connection was
refused during an rpcbind query.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'support')
-rw-r--r-- | support/nfs/getport.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/support/nfs/getport.c b/support/nfs/getport.c index e39f809..f5ba4ef 100644 --- a/support/nfs/getport.c +++ b/support/nfs/getport.c @@ -79,6 +79,9 @@ nfs_gp_map_tcp_errorcodes(const unsigned short protocol) case ETIMEDOUT: rpc_createerr.cf_stat = RPC_TIMEDOUT; break; + case ECONNREFUSED: + rpc_createerr.cf_stat = RPC_CANTRECV; + break; } } |