Re: mount_nfs -T breakage
* Bakul Shah <[EMAIL PROTECTED]> [020725 23:14] wrote: > > 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? > > Thank you for the patch! Yes, it works. Right after I sent > out my message I tried an almost identical patch which also > worked but, as I said I don't understand this code, didn't > have time to understand it and my patch seemed a bit hacky so > I kept quiet. Actually this whole routine seems hacky -- why > look up "udp" when you are told explicitly to use tcp? Oh > well, I should keep quiet until I really understand it:-) Ian, can you commit this fix? -Alfred To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: mount_nfs -T breakage
> 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? Thank you for the patch! Yes, it works. Right after I sent out my message I tried an almost identical patch which also worked but, as I said I don't understand this code, didn't have time to understand it and my patch seemed a bit hacky so I kept quiet. Actually this whole routine seems hacky -- why look up "udp" when you are told explicitly to use tcp? Oh well, I should keep quiet until I really understand it:-) Thanks again! -- bakul To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
mount_nfs -T breakage
TCP mount of nfs seems to be broken. # mount bar:/usr /mnt [tcp] bar:/usr: RPCPROG_NFS: RPC: Unknown protocol I tracked this down to lib/libc/rpc/rpcb_clnt.c. Seems like the problem is in __rpcb_findaddr_timed(). diff -r 1.9 rpcb_clnt.c --- rpcb_clnt.c 22 Mar 2002 23:18:37 - 1.9 +++ rpcb_clnt.c 11 Jul 2002 16:23:04 - 1.10 ...[deleted]... @@ -672,13 +731,15 @@ * starts working properly. Also look under clnt_vc.c. */ struct netbuf * -__rpcb_findaddr(program, version, nconf, host, clpp) +__rpcb_findaddr_timed(program, version, nconf, host, clpp, tp) rpcprog_t program; ...[deleted]... @@ -710,22 +777,31 @@ */ if (strcmp(nconf->nc_proto, NC_TCP) == 0) { struct netconfig *newnconf; + void *handle; - if ((newnconf = getnetconfigent("udp")) == NULL) { + if ((handle = getnetconfigent("udp")) == NULL) { + rpc_createerr.cf_stat = RPC_UNKNOWNPROTO; + return (NULL); + } + if ((newnconf = __rpc_getconf(handle)) == NULL) { + __rpc_endconf(handle); rpc_createerr.cf_stat = RPC_UNKNOWNPROTO; return (NULL); } client = getclnthandle(host, newnconf, &parms.r_addr); - freenetconfigent(newnconf); + __rpc_endconf(handle); } else { client = getclnthandle(host, nconf, &parms.r_addr); Notice how newnconf, the second arg of getclnthandle(), is derived. Previously it was the output of getnetconfigent() while now it is output of __rpc_getconf(). It expects its arg to be of type ``struct handle*'', but it is given an arg of type ``struct netconfig*'' The two structs are not congruent. I don't really understand this code so I don't know what the real fix is. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message