svn commit: r365020 - projects/nfs-over-tls/sys/fs/nfsclient
Rick Macklem
rmacklem at FreeBSD.org
Tue Sep 1 01:12:56 UTC 2020
Author: rmacklem
Date: Tue Sep 1 01:12:55 2020
New Revision: 365020
URL: https://svnweb.freebsd.org/changeset/base/365020
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:
projects/nfs-over-tls/sys/fs/nfsclient/nfs_clvfsops.c
Modified: projects/nfs-over-tls/sys/fs/nfsclient/nfs_clvfsops.c
==============================================================================
--- projects/nfs-over-tls/sys/fs/nfsclient/nfs_clvfsops.c Tue Sep 1 01:10:16 2020 (r365019)
+++ projects/nfs-over-tls/sys/fs/nfsclient/nfs_clvfsops.c Tue Sep 1 01:12:55 2020 (r365020)
@@ -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) {
More information about the svn-src-projects
mailing list