mirror of
https://git.FreeBSD.org/src.git
synced 2025-02-07 22:59:27 +00:00
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.
This commit is contained in:
parent
30d46e454a
commit
4cdbb07b3c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=365019
@ -1419,7 +1419,9 @@ mountnfs(struct nfs_args *argp, struct mount *mp, struct sockaddr *nam,
|
||||
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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user