Date: Fri, 16 Dec 2022 21:25:35 GMT From: Rick Macklem <rmacklem@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: a3c07a933d5c - stable/13 - rpcb_clnt.c: Do not force use of UDP Message-ID: <202212162125.2BGLPZRD099127@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=a3c07a933d5cb71a6d58cc9f0ecb5385a5e0ea29 commit a3c07a933d5cb71a6d58cc9f0ecb5385a5e0ea29 Author: Rick Macklem <rmacklem@FreeBSD.org> AuthorDate: 2022-11-13 20:16:06 +0000 Commit: Rick Macklem <rmacklem@FreeBSD.org> CommitDate: 2022-12-16 21:23:49 +0000 rpcb_clnt.c: Do not force use of UDP Without this patch, the code in the rpcbind client forces the use of UDP. A comment notes that some rpcbind servers only support UDP. This makes NFSv3 mounts to Azure servers impossible, since they require use of TCP for rpcbind. Since the comment is very old (imported from NetBSD in 2001) and I do not believe any UDP only rpcbind servers will still exist, this patch comments out the code that forces use of UDP, so that NFSv3 mounts to Azure servers can work. For an NFSv3 mount, the "udp" mount option will still make mount_nfs use UDP for rpcbind so that can be used as a workaround for any old NFSv3 server that only supports rpcbind over UDP (if any such server still exists). I asked if doing this change is appropriate on freebsd-fs@ and I only got one reply (off list) that supported doing the change. PR: 267301 (cherry picked from commit 032b04626b671ec16deacd479569998b96c96142) --- lib/libc/rpc/rpcb_clnt.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/libc/rpc/rpcb_clnt.c b/lib/libc/rpc/rpcb_clnt.c index f39d99bfeee3..b44fd1c5e77b 100644 --- a/lib/libc/rpc/rpcb_clnt.c +++ b/lib/libc/rpc/rpcb_clnt.c @@ -741,6 +741,16 @@ __rpcb_findaddr_timed(rpcprog_t program, rpcvers_t version, rpcvers_t pmapvers = 2; struct pmap pmapparms; + /* + * The comment below is now very old, having + * been committed to FreeBSD during an import + * from NetBSD in 2001. I do not believe there + * will still be any rpcbind servers that do + * UDP only and, since Azure requires use of + * TCP for NFSv3 mounts, comment this out + * so that NFSv3 mounts on Azure can work. + */ +#ifdef notnow /* * Try UDP only - there are some portmappers out * there that use UDP only. @@ -754,9 +764,9 @@ __rpcb_findaddr_timed(rpcprog_t program, rpcvers_t version, } client = getclnthandle(host, newnconf, &parms.r_addr); freenetconfigent(newnconf); - } else { + } else +#endif client = getclnthandle(host, nconf, &parms.r_addr); - } if (client == NULL) return (NULL);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202212162125.2BGLPZRD099127>