From owner-svn-src-all@freebsd.org Tue Sep 1 01:10:17 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 85F013D428B; Tue, 1 Sep 2020 01:10:17 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BgTWs32KBz4P5y; Tue, 1 Sep 2020 01:10:17 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4B8C710954; Tue, 1 Sep 2020 01:10:17 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0811AHg9068652; Tue, 1 Sep 2020 01:10:17 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0811AHqm068651; Tue, 1 Sep 2020 01:10:17 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <202009010110.0811AHqm068651@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Tue, 1 Sep 2020 01:10:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365019 - head/sys/fs/nfsclient X-SVN-Group: head X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: head/sys/fs/nfsclient X-SVN-Commit-Revision: 365019 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Sep 2020 01:10:17 -0000 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) {