From owner-freebsd-current Sun Jun 11 9:10:46 2000 Delivered-To: freebsd-current@freebsd.org Received: from cr1003333-a.crdva1.bc.home.com (cr1003333-a.crdva1.bc.wave.home.com [24.113.51.240]) by hub.freebsd.org (Postfix) with ESMTP id 7025C37B6CA for ; Sun, 11 Jun 2000 09:10:41 -0700 (PDT) (envelope-from pangolin@home.com) Received: from cr1003333-a.crdva1.bc.wave.home.com. (localhost [127.0.0.1]) by cr1003333-a.crdva1.bc.home.com (8.9.3/8.9.3) with ESMTP id JAA06425; Sun, 11 Jun 2000 09:10:38 -0700 (PDT) (envelope-from pangolin@home.com) Message-Id: <200006111610.JAA06425@cr1003333-a.crdva1.bc.home.com> X-Mailer: XFMail 1.3 [p0] on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <200006110511.WAA24596@apollo.backplane.com> Date: Sun, 11 Jun 2000 09:10:38 -0700 (PDT) Reply-To: Jonathan Hanna Organization: Pangolin Systems From: Jonathan Hanna To: Matthew Dillon Subject: Re: RE: Strange rpc.statd and mount_nfs Cc: freebsd-current@FreeBSD.ORG Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 11-Jun-00 Matthew Dillon wrote: >:Here is a rather suspicious fix, I have not looked at rpc call >:use in detail: >: >:--- mount_nfs.c.orig Sat Jun 10 11:08:19 2000 >:+++ mount_nfs.c Sat Jun 10 11:09:06 2000 >:@@ -784,10 +784,11 @@ >: warnx("%s", clnt_sperror(clp, >: "bad MNT RPC")); >: } else { >:- auth_destroy(clp->cl_auth); >:- clnt_destroy(clp); >: retrycnt = 0; >: } >:+ auth_destroy(clp->cl_auth); >:+ clnt_destroy(clp); >:+ so = RPC_ANYSOCK; > > Good catch! This patch looks good to me, I am going to go ahead > and commit it. > > Resetting 'so' is good code form, but I went through the rpc code > and it wasn't an operational bug ... the rpc code can overwrite so > in the case of a failure but only with '-1', which is RPC_ANYSOCK > anyway. Still, it's good not to make assumptions. > > -Matt Without the "so = RPC_ANYSOCK" and no other changes, the "weak credential" failure turned into a "bad file descriptor" failure, so I think the non -1 socket fd is being reused. Perhaps the initialization of "so" should be moved into the retry loop. Jonathan Hanna To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message