9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: presotto@closedmind.org
To: 9fans@cse.psu.edu
Subject: Re: [9fans] ftpd
Date: Wed, 16 Jan 2002 09:21:35 -0500	[thread overview]
Message-ID: <20020116142142.9095D19A00@mail.cse.psu.edu> (raw)

[-- Attachment #1: Type: text/plain, Size: 1332 bytes --]

We also return random ordering to DNS requests in an attempt to
spread load.

However, DNS has nothing to do with arisawa's fix.  He is correct.
When an ftp client uses Active mode transfers, it requires the
server to call it back.  If the client is behind a box doing
NAT for it, the data call back may have to be from the same
address that the control call was to.  I say may because the
ftp rfc doesn't require this, so some NAT box may get it right
if it just uses a two tuple (local port/local addr) rather
than a 4 tuple (local port/local addr/remote port/remote addr)
to index its mappings.

I live behind a NAT now, much to my utter shame and horror,
because my ISP stopped giving out multiple addresses.  However,
I don't notice the problem; perhaps because all servers these
days seem to accept Passive ftp connections, i.e., the client
makes both the control and data connections avoiding the call
back scenario arisiwa is fixing.  I take it he still talks to
some old ftp servers.  The code would work in more situations
with his fix, regardless of what the rfc says.  I remember the
original RFC was written to allow the data call back to come
from an entirely different machine to allow load distribution
but since noone does that, I wouldn't expect any NAT to support
it, except by accident.

[-- Attachment #2: Type: message/rfc822, Size: 2129 bytes --]

From: Boyd Roberts <boyd@strakt.com>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] ftpd
Date: Wed, 16 Jan 2002 13:01:19 +0100
Message-ID: <3C456B8F.E715F1D6@strakt.com>

arisawa@ar.aichi-u.ac.jp wrote:
> The line:
>         fd = dial(data,"20",0,0);
> in ftpd.c may make a trouble when the server has two IPs.

I may be a bit out of context here but it must be remembered
that the IP addresses returned by the remote DNS are returned
in a random order, if we are talking unix BIND/named.

This was a design/implementation decision.

Does plan 9 allow you to specify the 'sort order' [a heuristic
in the client resolver library to get around these types
of problems]?

             reply	other threads:[~2002-01-16 14:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-16 14:21 presotto [this message]
2002-01-16 14:22 ` Boyd Roberts
  -- strict thread matches above, loose matches on Subject: below --
2002-01-17  3:24 presotto
2002-01-16 23:22 geoff
2002-01-16 15:17 presotto
2002-01-16 15:17 presotto
2002-01-16 15:20 ` Boyd Roberts
2002-01-16 15:07 presotto
2002-01-16 15:08 ` Boyd Roberts
2002-01-16 10:36 arisawa
2002-01-16 12:01 ` Boyd Roberts

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=20020116142142.9095D19A00@mail.cse.psu.edu \
    --to=presotto@closedmind.org \
    --cc=9fans@cse.psu.edu \
    /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 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).