Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Sep 2020 01:10:17 +0000 (UTC)
From:      Rick Macklem <rmacklem@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r365019 - head/sys/fs/nfsclient
Message-ID:  <202009010110.0811AHqm068651@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rmacklem
Date: Tue Sep  1 01:10:16 2020
New Revision: 365019
URL: https://svnweb.freebsd.org/changeset/base/365019

Log:
  Add a check to test for the case of the "tls" option being used with "udp".
  
  The KERN_TLS only supports TCP, so use of the "tls" option with "udp" will
  not work.  This patch adds a test for this case, so that the mount is not
  attempted when both "tls" and "udp" are specified.

Modified:
  head/sys/fs/nfsclient/nfs_clvfsops.c

Modified: head/sys/fs/nfsclient/nfs_clvfsops.c
==============================================================================
--- head/sys/fs/nfsclient/nfs_clvfsops.c	Tue Sep  1 00:14:40 2020	(r365018)
+++ head/sys/fs/nfsclient/nfs_clvfsops.c	Tue Sep  1 01:10:16 2020	(r365019)
@@ -1419,7 +1419,9 @@ mountnfs(struct nfs_args *argp, struct mount *mp, stru
 		if ((newflag & NFSMNT_TLS) != 0) {
 			error = EINVAL;
 #ifdef KERN_TLS
-			if (rpctls_getinfo(&maxlen, true, false))
+			/* KERN_TLS is only supported for TCP. */
+			if (argp->sotype == SOCK_STREAM &&
+			    rpctls_getinfo(&maxlen, true, false))
 				error = 0;
 #endif
 			if (error != 0) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202009010110.0811AHqm068651>