From owner-freebsd-current Thu Jul 25 17:19:37 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D768137B400 for ; Thu, 25 Jul 2002 17:19:34 -0700 (PDT) Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by mx1.FreeBSD.org (Postfix) with SMTP id 9F30D43E31 for ; Thu, 25 Jul 2002 17:19:33 -0700 (PDT) (envelope-from iedowse@maths.tcd.ie) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 26 Jul 2002 01:19:32 +0100 (BST) To: Bakul Shah Cc: current@freebsd.org Subject: Re: mount_nfs -T breakage In-Reply-To: Your message of "Wed, 24 Jul 2002 17:50:08 PDT." <200207250050.UAA20544@wellington.cnchost.com> Date: Fri, 26 Jul 2002 01:19:31 +0100 From: Ian Dowse Message-ID: <200207260119.aa77821@salmon.maths.tcd.ie> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message <200207250050.UAA20544@wellington.cnchost.com>, Bakul Shah writes: >TCP mount of nfs seems to be broken. Yes, that code is very broken indeed. It probably was supposed to call __rpc_setconf("udp") and not getnetconfigent("udp"), but that seems to pick up an ipv6 address. I think the best plan is to go back to the way that part of the code was before revision 1.10. Could you try the following patch? Ian Index: rpcb_clnt.c =================================================================== RCS file: /dump/FreeBSD-CVS/src/lib/libc/rpc/rpcb_clnt.c,v retrieving revision 1.10 diff -u -r1.10 rpcb_clnt.c --- rpcb_clnt.c 11 Jul 2002 16:23:04 -0000 1.10 +++ rpcb_clnt.c 26 Jul 2002 00:05:29 -0000 @@ -685,7 +685,7 @@ nconf = NULL; localhandle = setnetconfig(); - while (nconf = getnetconfig(localhandle)){ + while ((nconf = getnetconfig(localhandle)) != NULL) { if (nconf->nc_protofmly != NULL && strcmp(nconf->nc_protofmly, NC_LOOPBACK) == 0) break; @@ -777,19 +777,13 @@ */ if (strcmp(nconf->nc_proto, NC_TCP) == 0) { struct netconfig *newnconf; - void *handle; - if ((handle = getnetconfigent("udp")) == NULL) { - rpc_createerr.cf_stat = RPC_UNKNOWNPROTO; - return (NULL); - } - if ((newnconf = __rpc_getconf(handle)) == NULL) { - __rpc_endconf(handle); + if ((newnconf = getnetconfigent("udp")) == NULL) { rpc_createerr.cf_stat = RPC_UNKNOWNPROTO; return (NULL); } client = getclnthandle(host, newnconf, &parms.r_addr); - __rpc_endconf(handle); + freenetconfigent(newnconf); } else { client = getclnthandle(host, nconf, &parms.r_addr); } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message