9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] dial errstr question
@ 2011-05-14  8:06 rod
  2011-05-14  8:43 ` erik quanstrom
  0 siblings, 1 reply; 3+ messages in thread
From: rod @ 2011-05-14  8:06 UTC (permalink / raw)
  To: 9fans

I notice that the dial implementaion has recently changed to support
dialling multiple ip addresses in parallel.

If one dials a single-ip host that isn't responding to ip packets
then, after the tcp timeout expires, errstr is set to "connection
refused".

If however one dials a host that has multiple ip addresses and none of
them respond then errstr is set to "progname pid: alarm".

This doesn't seem consistent. Would it be possible to have "connection
refused" set in the second case too? I think both scenarios are
essentially the same as far as client code is concerned.

Rod



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

* Re: [9fans] dial errstr question
  2011-05-14  8:06 [9fans] dial errstr question rod
@ 2011-05-14  8:43 ` erik quanstrom
  2011-05-14  9:29   ` rod
  0 siblings, 1 reply; 3+ messages in thread
From: erik quanstrom @ 2011-05-14  8:43 UTC (permalink / raw)
  To: 9fans

On Sat May 14 04:09:08 EDT 2011, rod@hemiola.co.uk wrote:
> I notice that the dial implementaion has recently changed to support
> dialling multiple ip addresses in parallel.
>
> If one dials a single-ip host that isn't responding to ip packets
> then, after the tcp timeout expires, errstr is set to "connection
> refused".
>
> If however one dials a host that has multiple ip addresses and none of
> them respond then errstr is set to "progname pid: alarm".
>
> This doesn't seem consistent. Would it be possible to have "connection
> refused" set in the second case too? I think both scenarios are
> essentially the same as far as client code is concerned.

it also introduces some non-determinism that might be trouble.

suppose that you can start an ip6 and ip4 connection, but for some
reason the ip4 path has a too-low mtu, and no icmp return.
with the first packet in winning, it's up to luck if the connection
will work or not.

it's not too hard to think about other reasonable situations that might
usually fail.  suppose that you have a ssh-based tunnel that you prefer
to use.  if the dialing sequence returned by cs also includes a non-encrypted
path, you're pretty likely to get the unencrypted path returned first.

the first thing that comes to mind as a solution is a pre-determined order.  and
a delay proportional to the time it takes to get the first response.
but maybe that's too fancy.  and, maybe at the same time not fancy enough.

- erik



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

* Re: [9fans] dial errstr question
  2011-05-14  8:43 ` erik quanstrom
@ 2011-05-14  9:29   ` rod
  0 siblings, 0 replies; 3+ messages in thread
From: rod @ 2011-05-14  9:29 UTC (permalink / raw)
  To: 9fans


>it also introduces some non-determinism that might be trouble.

Also, it does seem to be the case that most big internet sites have
multiple ip addresses which rotate each time a dns query is issued.
Ebay has 6 for example.  A dial to www.ebay.co.uk now sends 6 syns.
Maybe a couple of the ip addresses manage to respond with a syn before
one of them is is "chosen". The other five are reset. I'm finding it
hard to convince myself that this is good behaviour.

Rod



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

end of thread, other threads:[~2011-05-14  9:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-14  8:06 [9fans] dial errstr question rod
2011-05-14  8:43 ` erik quanstrom
2011-05-14  9:29   ` rod

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).