Subject: bin/882: amd missing option
To: None <gnats-admin@NetBSD.ORG>
From: Arne H. Juul <arnej@boks.pvv.unit.no>
List: netbsd-bugs
Date: 03/18/1995 12:50:09
>Number: 882
>Category: bin
>Synopsis: amd misses options that may be necessary for mounting
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: bin-bug-people (Utility Bug People)
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Sat Mar 18 12:50:05 1995
>Originator: Arne H. Juul
>Organization:
University of Trondheim, Norway
>Release: NetBSD-current source date: Mar 18, 1995
>Environment:
People in heterogenous unix networks using NFS may see this problem.
System: NetBSD boks.pvv.unit.no 1.0A NetBSD 1.0A (BOKS) #14: Tue Mar 14 23:33:44 MET 1995 root@boks.pvv.unit.no:/usr/src/sys/arch/i386/compile/BOKS i386
>Description:
amd should have options equivalent to these two options (from
mount_nfs manpage):
-P Use a reserved socket port number. This is useful for mounting
servers that require clients to use a reserved port number.
-c For UDP mount points, do not do a connect(2). This must be used
for servers that do not reply to requests from the standard port
number.
'useful' is a slight understatement, 'must be used' is a better
description.
Some thoughts:
Wouldn't it be just as easy just to have the kernel *always* use a
reserved port number? This would simplify mount_nfs, amd, and the
kernel a bit, but give a small change that mounts would fail (if
all the reserved ports are used).
>How-To-Repeat:
Try to amd mount filesystems from NFS servers with one of the
above-described properties.
>Fix:
Please apply the following patches. These are according to
the rest of amd (and, for "noconn", the documentation).
diff -ru /usr/src/usr.sbin/amd/amd/nfs_ops.c ./amd/nfs_ops.c
--- /usr/src/usr.sbin/amd/amd/nfs_ops.c Tue Jun 14 12:34:05 1994
+++ ./amd/nfs_ops.c Sat Mar 18 16:58:52 1995
@@ -610,6 +610,11 @@
nfs_args.flags |= NFSMNT_NOCONN;
#endif /* MNTOPT_NOCONN */
+#ifdef MNTOPT_RESVPORT
+ if (hasmntopt(&mnt, "resvport") != NULL)
+ nfs_args.flags |= NFSMNT_RESVPORT;
+#endif /* MNTOPT_RESVPORT */
+
#ifdef NFSMNT_PGTHRESH
if (nfs_args.pg_thresh = hasmntval(&mnt, "pgthresh"))
nfs_args.flags |= NFSMNT_PGTHRESH;
diff -ru /usr/src/usr.sbin/amd/config/os-bsd44.h ./config/os-bsd44.h
--- /usr/src/usr.sbin/amd/config/os-bsd44.h Wed Jun 15 12:30:32 1994
+++ ./config/os-bsd44.h Sat Mar 18 16:58:07 1995
@@ -158,6 +158,10 @@
#define MNTOPT_SOFT "soft" /* soft mount */
#define MNTOPT_INTR "intr" /* interrupts allowed */
+#ifdef __NetBSD__
+#define MNTOPT_NOCONN "noconn" /* accept any responder */
+#define MNTOPT_RESVPORT "resvport" /* use reserved port */
+#endif
#define NFSMNT_HOSTNAME 0 /* hostname on 4.4 is not optional */
>Audit-Trail:
>Unformatted: