Date: Fri, 26 Jul 2002 01:19:31 +0100 From: Ian Dowse <iedowse@maths.tcd.ie> To: Bakul Shah <bakul@bitblocks.com> Cc: current@freebsd.org Subject: Re: mount_nfs -T breakage Message-ID: <200207260119.aa77821@salmon.maths.tcd.ie> In-Reply-To: Your message of "Wed, 24 Jul 2002 17:50:08 PDT." <200207250050.UAA20544@wellington.cnchost.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200207260119.aa77821>
