From: minoura@valinux.co.jp (Minoura Makoto) Subject: [PATCH] knfsd restart fails Date: Wed, 10 Apr 2002 14:54:07 +0900 Sender: nfs-admin@lists.sourceforge.net Message-ID: <20020410055407.9B26619F26B@brer.local.valinux.co.jp> Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII Return-path: Received: from gw1.valinux.co.jp ([202.221.173.98] helo=brer.local.valinux.co.jp) by usw-sf-list1.sourceforge.net with esmtp (Exim 3.31-VA-mm2 #1 (Debian)) id 16vB3a-0000up-00 for ; Tue, 09 Apr 2002 22:54:10 -0700 To: nfs@lists.sourceforge.net Errors-To: nfs-admin@lists.sourceforge.net List-Help: List-Post: List-Subscribe: , List-Id: Discussion of NFS under Linux development, interoperability, and testing. List-Unsubscribe: , List-Archive: The following patch for 2.5.7 will fix the problem that when a NFS/TCP client exists attempts to restart nfsd will (silently) fail. This is because some client implementations (Linux, *BSD) do not immediately close the connection when the server socket is closed, and bind() will fail EADDRINUSE. We have to do setsockopt(SO_REUSEADDR) to cope with them. -- Minoura Makoto Engineering Dept., VA Linux Systems Japan --- net/sunrpc/svcsock.c.orig Wed Mar 27 21:24:55 2002 +++ net/sunrpc/svcsock.c Wed Mar 27 21:51:43 2002 @@ -1225,6 +1225,8 @@ return error; if (sin != NULL) { + if (protocol == IPPROTO_TCP) + sock->sk->reuse = 1; error = sock->ops->bind(sock, (struct sockaddr *) sin, sizeof(*sin)); if (error < 0) _______________________________________________ NFS maillist - NFS@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nfs