Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/nfsd Per the documented behaviour in the man page, ...



details:   https://anonhg.NetBSD.org/src/rev/fcc1eba7c8bc
branches:  trunk
changeset: 475965:fcc1eba7c8bc
user:      soren <soren%NetBSD.org@localhost>
date:      Tue Aug 31 23:28:34 1999 +0000

description:
Per the documented behaviour in the man page, default to
serving UDP requests if none of the -t or -u options are
given.

Previously, nfsd wouldn't actually do anything at all
if it was not told to do UDP and/or TCP, which could be
confusing.

Note that at least Solaris and IRIX default to both TCP
and UDP when nfsd is run without options. This might be
useful for NetBSD as well.

Fixes PR bin/7358.

diffstat:

 usr.sbin/nfsd/nfsd.c |  10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diffs (31 lines):

diff -r c64293d3e882 -r fcc1eba7c8bc usr.sbin/nfsd/nfsd.c
--- a/usr.sbin/nfsd/nfsd.c      Tue Aug 31 23:19:50 1999 +0000
+++ b/usr.sbin/nfsd/nfsd.c      Tue Aug 31 23:28:34 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nfsd.c,v 1.30 1999/06/07 06:13:41 thorpej Exp $        */
+/*     $NetBSD: nfsd.c,v 1.31 1999/08/31 23:28:34 soren Exp $  */
 
 /*
  * Copyright (c) 1989, 1993, 1994
@@ -46,7 +46,7 @@
 #if 0
 static char sccsid[] = "@(#)nfsd.c     8.9 (Berkeley) 3/29/95";
 #else
-__RCSID("$NetBSD: nfsd.c,v 1.30 1999/06/07 06:13:41 thorpej Exp $");
+__RCSID("$NetBSD: nfsd.c,v 1.31 1999/08/31 23:28:34 soren Exp $");
 #endif
 #endif /* not lint */
 
@@ -223,6 +223,12 @@
                }
        }
 
+       /*
+        * If none of TCP or UDP are specified, default to UDP only.
+        */
+       if (tcpflag == 0 && udpflag == 0)
+               udpflag = 1;
+
        if (debug == 0) {
                daemon(0, 0);
                (void)signal(SIGHUP, SIG_IGN);



Home | Main Index | Thread Index | Old Index