All of lore.kernel.org
 help / color / mirror / Atom feed
* mountd --no-tcp -p bugs?
@ 2003-02-11  0:28 Ben Leslie
  2003-02-14  8:17 ` Ben Leslie
  0 siblings, 1 reply; 3+ messages in thread
From: Ben Leslie @ 2003-02-11  0:28 UTC (permalink / raw)
  To: nfs

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-02-19  4:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-11  0:28 mountd --no-tcp -p bugs? Ben Leslie
2003-02-14  8:17 ` Ben Leslie
2003-02-19  4:27   ` Neil Brown

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.