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
-------------- next part --------------
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)) {