All of lore.kernel.org
 help / color / mirror / Atom feed
* [grumble] connected UDP sockets [grumble] Solaris [grumble]
@ 2008-10-23  3:57 Neil Brown
       [not found] ` <18687.63003.966163.267177-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Neil Brown @ 2008-10-23  3:57 UTC (permalink / raw)
  To: linux-nfs


The attentive reader of this mailing list may be aware that I was -
some time ago - advocating using connected UDP sockets when UDP was
used to contact the server during a mount. i.e. to talk to portmap and
mountd.

The benefit of this is that errors reported by ICMP (e.g. host
unreachable / port unreachable) are reported to the application with
connected sockets, whereas unconnected sockets need to wait for a
timeout.

I just discovered that there is a problem with this.  It involves
multihomed hosts and certain non-Linux operating systems such as
Solaris (I don't know which version(s)).

In one particular case, the UDP request (portmap lookup I assume) was
sent from a Linux client to a Solaris server and the reply promptly
came back from a different IP address (presumably the address of the
interface that Solaris wanted to route through to get to the client).
Linux replied to this with an ICMP error.  It couldn't send the reply
to mount.nfs because mount.nfs had a connected UDP sockets that was
connected to a different remote address.

This is arguably a bug in Solaris.  It should reply with a source
address matching the destination address of the request.  Linux hasn't
had that bug for years.  But we probably still have to live with it.

The conclusion is that if we use connected UDP sockets, we will get
unnecessary timeout talking to certain multihomed hosts, and if we
don't we will get unnecessary timeouts talking to certain hosts that
don't support portmap on UDP (for example).

I don't suppose there is a middle ground?  A semi-connected socket?
Or we could have one of each and see which one gets a reply first?
No, that's just yuck.


Much as it pains me to say this, maybe we just need to treat UDP as
legacy for all protocols (PORTMAP, MOUNT, NLM, NSM), not just NFS.
None of these problems occur with TCP.  TCP does have a slightly
higher overhead for simple transactions, but it is a cost that is
unlikely to be noticeable in reality.


Thoughts?

NeilBrown (grumble grumble).

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

end of thread, other threads:[~2008-10-23 16:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-23  3:57 [grumble] connected UDP sockets [grumble] Solaris [grumble] Neil Brown
     [not found] ` <18687.63003.966163.267177-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org>
2008-10-23  4:47   ` Greg Banks
2008-10-23 16:05   ` Chuck Lever

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.