From 870428eff33b564fadcbad71d19ff5d4ec69bb38 Mon Sep 17 00:00:00 2001 From: iedowse Date: Mon, 26 Aug 2002 13:08:23 +0000 Subject: [PATCH] Unbreak the -c option by not using connect(2) for mount_nfs's communication with the remote NFS server if this flag is specified. PR: bin/42003 Submitted by: Jean-Luc Richier --- sbin/mount_nfs/mount_nfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sbin/mount_nfs/mount_nfs.c b/sbin/mount_nfs/mount_nfs.c index b0abaf46f773..349b9129f6a5 100644 --- a/sbin/mount_nfs/mount_nfs.c +++ b/sbin/mount_nfs/mount_nfs.c @@ -660,7 +660,8 @@ nfs_tryproto(struct nfs_args *nfsargsp, struct addrinfo *ai, char *hostp, return (returncode(rpc_createerr.cf_stat, &rpc_createerr.cf_error)); } - if (nfsargsp->sotype == SOCK_DGRAM) { + if (nfsargsp->sotype == SOCK_DGRAM && + !(nfsargsp->flags & NFSMNT_NOCONN)) { /* * Use connect(), to match what the kernel does. This * catches cases where the server responds from the