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