Subject: [netatalk-admins] netatalk-1.4b2+asun2.1.0 afpd name registering problems

From: Neil McAllister <[email-masked]>
Date: Sat, 22 Aug 1998 13:56:18 -0700

Hi, I'm new to this list so I'm not certain if this is the right place
to try to find support for the "asun" variant of netatalk, but I noticed
an interesting issue when trying to start up multiple afpd servers on
this version.  Here's what's going on.

To simplify, let's say I have a network with two zones, "Zone 1" and
"Zone 2".  I want to start up two separate servers (using afpd.conf),
and I'd like one to appear in Zone 1, and the other to appear in Zone
2.  Both Zones are available on the same network segment, via a
standalone Appletalk router.  Zone 1 is the default zone the netatalk
server finds itself in, so for the first afp server all I need to do is
have a line in afpd.conf like:

"First Server" -notcp -guest [... etc.]

The second server needs to be "forced" to go into the other zone, so I
do it like this:

"Second Server:AFPServer@Zone 2" -notcp -guest [... etc.]

(The "AFPServer" part, as far as I can tell, is actually optional... you
only need the part with the @ sign.)

Now, technically, this works.  "Second Server" successfully shows up in
Zone 2 in the Chooser.  The problem I've noticed, though,  is when you
go to connect to the server via Appleshare.  Instead of just saying
you're connecting to "Second Server", it reports that you're trying to
connect to "Second Server:AFPServer@Zone 2".  This is not the behavior
of other Appleshare servers or of Macs running personal File Sharing.
None of these machines report the Zone part of the nbp name when you
connect through the Chooser.  I have no knowledge of the ins-and-outs of
the Appleshare protocol, I just know this doesn't happen.

OK, this problem is largely cosmetic.  (Though, being a Mac user, I'd
like it patched up for that reason alone. ;-)  But I have noticed
another thing that seems sort of strange, and I have a weird hunch it's
related.

When I tried to connect to Second Server from a Mac client in Zone 2 via
Appleshare/IP, and log in using a correct username and password,
netatalk authenticates me properly.  But as soon as I select a volume on
Second Server and hit OK, it reports a strange error about the
connection being refused, that I should contact my administrator, and in
parenthesis something about Appleshare software not being installed.
It's damn odd!  And somehow, I have a suspicion it can be traced back to
netatalk returning an incorrect server name to the Chooser (including
the full Zone address info in the server nbp name, when it shouldn't).

So to reiterate:
1.  Second Server is in Zone 2, and the Mac that gets the error is in
Zone 2.
2.  I don't get the error from any machine connecting to Second Server
from Zone 1.
3.  I don't get the error connecting to First Server from the Mac that
gets the error connecting to Second Server.
4.  Macs in Zone 2 don't get the error connecting to First Server,
either.

It seems suspiciously to me as though netatalk is returning an nbp name
that is forcing the Mac to look for a "different" Zone that seems to be
named the same thing as the Zone it's already in, at some point in the
Appleshare negotiation process.

But here's the kicker -- I don't think I got the error when connecting
via Appletalk.  My memory may be cloudy, but I believe it happened ONLY
when connecting via Appleshare IP.  And worse -- the same Mac that got
the error when using a properly-authenticated username/password pair DID
NOT get the error when connecting to Second Server as "Guest", whether
using Appletalk or Appleshare IP.

Is that bizarre enough for you folks?  I'd love to hear any feedback.

(Incidentally, my solution for the present is to just leave all the afp
servers in the default Zone, though that would not be my preference for
the long term, and I don't see any reason why netatalk should mandate
that behavior.)