From owner-freebsd-current Wed Jul 24 17:50:14 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 C7F7537B400 for ; Wed, 24 Jul 2002 17:50:09 -0700 (PDT) Received: from wellington.cnchost.com (wellington.concentric.net [207.155.252.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5542743E75 for ; Wed, 24 Jul 2002 17:50:09 -0700 (PDT) (envelope-from bakul@bitblocks.com) Received: from bitblocks.com (adsl-209-204-185-216.sonic.net [209.204.185.216]) by wellington.cnchost.com id UAA20544; Wed, 24 Jul 2002 20:50:09 -0400 (EDT) [ConcentricHost SMTP Relay 1.14] Message-ID: <200207250050.UAA20544@wellington.cnchost.com> To: current@freebsd.org Subject: mount_nfs -T breakage Date: Wed, 24 Jul 2002 17:50:08 -0700 From: Bakul Shah 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 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 -0000 1.9 +++ rpcb_clnt.c 11 Jul 2002 16:23:04 -0000 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 majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message