From: Ben Leslie <benno@sesgroup.net>
To: nfs@lists.sourceforge.net
Subject: mountd --no-tcp -p bugs?
Date: Tue, 11 Feb 2003 11:28:46 +1100 [thread overview]
Message-ID: <20030211002846.GC7774@retsil.sesgroup.com.au> (raw)
Hi all,
I'm running into a couple of problems with mountd.
I'm using nfs-kernel-server version 1:1.0-2 package
provided in Debian stable. However looking at the source
seems to indicate the same problems would exist in current
cvs version.
Problem 1/
The -n flag (short for --no-tcp) is ignored.
To reproduce: rpc.mountd -n
The problem seems to be in utils/mountd/mountd.c.
while ((c = getopt_long(argc, argv, "o:Fd:f:p:P:hN:V:v", longopts, NULL)) != EOF)
Probably should be:
while ((c = getopt_long(argc, argv, "o:Fd:f:p:P:hN:V:vn", longopts, NULL)) != EOF)
Problem 2/
The --no-tcp and -p <portnum> options don't play well together.
Specifically, if you specify --no-tcp the -p option is ignored. I couldn't
find anything to indicate that this was the desired behaviour.
The problem here seems to be in the rpc_init() function (support/nfs/rpcmisc.c).
Specifically this bit:
if ((_rpcfdtype == 0) || (_rpcfdtype == SOCK_DGRAM)) {
static SVCXPRT *last_transp = NULL;
if (_rpcfdtype == 0) {
if (last_transp
&& (!defport || defport == last_transp->xp_port)) {
transp = last_transp;
goto udp_transport;
}
if (defport == 0)
sock = RPC_ANYSOCK;
else if ((sock = makesock(defport, IPPROTO_UDP)) < 0) {
xlog(L_FATAL, "%s: cannot make a UDP socket\n",
name);
}
}
if (sock == RPC_ANYSOCK)
sock = svcudp_socket (prog, 1);
transp = svcudp_create(sock);
defport is only looked at if the _rpcfgtype is set to zero, which
seems to me to be incorrect behaviour. However, since the rpc_init()
function is probably used by things other than mountd, chaning this
behaviour may have other unintended side affects. (Or I could be wrong
and this is indeed the correct behaviour, in which case the docs should
probably explain this.)
Cheers,
Benno
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
next reply other threads:[~2003-02-11 0:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-11 0:28 Ben Leslie [this message]
2003-02-14 8:17 ` mountd --no-tcp -p bugs? Ben Leslie
2003-02-19 4:27 ` Neil Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030211002846.GC7774@retsil.sesgroup.com.au \
--to=benno@sesgroup.net \
--cc=nfs@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.