Date: Wed, 9 Feb 2005 23:13:29 +0900 (JST) From: Tod McQuillin <devin@spamcop.net> To: Pete French <petefrench@ticketswitch.com> Cc: freebsd-stable@freebsd.org Subject: Re: Bug in nfsd, or did I just read the manpage wrong ? Message-ID: <20050209231126.D64632@plexi.pun-pun.prv> In-Reply-To: <E1Cypvz-000JVW-Vf@dilbert.firstcallgroup.co.uk> References: <E1Cypvz-000JVW-Vf@dilbert.firstcallgroup.co.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] On Wed, 9 Feb 2005, Pete French wrote: > I have a machine with three interfaces on it, two onto > internal networks, one ointo the outside world. I only want > NFS to be accessible on the two internal interfaces so I have this line > in my /etc/rc.conf: > > nfs_server_flags="-u -t -n 4 -h 192.168.3.1 -h 192.168.4.1" > > That works - but it ony enables TCP on the second interface, the > first is UDP only. I have tried all sorts of combinations and > positioning for the -t flag, but the end result is the same. UDP > on both, TCP only on 192.168.4.1. > > Hmmmm... anybody got any ideas ? Puzzling the hell out of me! Try the patch in http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/25826 That worked for me. I've also attached the patch to this email. -- tod McQuillin [-- Attachment #2 --] Index: nfsd.c =================================================================== RCS file: /usr/src/cvs-repo/src/sbin/nfsd/Attic/nfsd.c,v retrieving revision 1.15.2.2 diff -u -r1.15.2.2 nfsd.c --- nfsd.c 30 Mar 2004 20:25:33 -0000 1.15.2.2 +++ nfsd.c 10 May 2004 12:40:41 -0000 @@ -593,7 +593,8 @@ exit(1); } } - if (tcpflag && FD_ISSET(tcpsock, &ready)) { + for (tcpsock = 0; tcpsock <= maxsock; tcpsock++) { + if (tcpflag && FD_ISSET(tcpsock, &ready)) { len = sizeof(inetpeer); if ((msgsock = accept(tcpsock, (struct sockaddr *)&inetpeer, &len)) < 0) { @@ -613,6 +614,7 @@ nfsdargs.namelen = sizeof(inetpeer); nfssvc(NFSSVC_ADDSOCK, &nfsdargs); (void)close(msgsock); + } } #ifdef notyet if (tp4flag && FD_ISSET(tp4sock, &ready)) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050209231126.D64632>
