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) { _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"