summaryrefslogtreecommitdiffstats
path: root/sbin/mount_nfs
diff options
context:
space:
mode:
authoriedowse <iedowse@FreeBSD.org>2002-08-26 13:08:23 +0000
committeriedowse <iedowse@FreeBSD.org>2002-08-26 13:08:23 +0000
commit870428eff33b564fadcbad71d19ff5d4ec69bb38 (patch)
tree902ed06e957bba7c5239abc39e68759206bff6b7 /sbin/mount_nfs
parent74781c1af250e11f41bec5eb3d50a5c820e251de (diff)
downloadFreeBSD-src-870428eff33b564fadcbad71d19ff5d4ec69bb38.zip
FreeBSD-src-870428eff33b564fadcbad71d19ff5d4ec69bb38.tar.gz
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 <Jean-Luc.Richier@imag.fr>
Diffstat (limited to 'sbin/mount_nfs')
-rw-r--r--sbin/mount_nfs/mount_nfs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sbin/mount_nfs/mount_nfs.c b/sbin/mount_nfs/mount_nfs.c
index b0abaf4..349b912 100644
--- a/sbin/mount_nfs/mount_nfs.c
+++ b/sbin/mount_nfs/mount_nfs.c
@@ -660,7 +660,8 @@ tryagain:
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
OpenPOWER on IntegriCloud