[netatalk-admins] Re: Hack for FreeBSD nbprgstr Was: Trouble with nbprgstr...


Subject: [netatalk-admins] Re: Hack for FreeBSD nbprgstr Was: Trouble with nbprgstr...
From: Peter Hjelt (Peter.Hjelt@vtt.fi)
Date: Fri Mar 13 1998 - 07:14:13 EST


>With the UAR router we did specify a separate zone, "MyZone". It seems
>as though Netatalk needs this zone to complete an nbprgstr. I don't
>understand why it fails to complete the registration process in the
>netatalk.sh script when the default zone "*" is the target.

Ah, got your message about nbprgstr problems about at the same time I posted
my message titled "Odd nbprgstr problems with 1.4b2/FreeBSD 2.2.5" earlier
today; we both seem to suffer from nbprgstr 1.4b2 not being able to register
names on the default zone under FreeBSD.

Here is what I came up with to fake it (note: this is a mere hack, not the
solution .. it will, however, work until someone else on the list can explain
to us what's actually going wrong and what the real fix is supposed to be).

Apply this patch in /usr/ports/net/netatalk/work/netatalk-1.4b2/libatalk/nbp/
and recompile/install ../../etc/afpd/afpd and ../../bin/nbp/nbprgstr

--- nbp_rgstr.c Fri Mar 13 12:57:39 1998
+++ nbp_rgstr.c Fri Mar 13 13:09:02 1998
@@ -109,9 +109,13 @@
     if (( cc = select( s + 1, &readfd, 0, 0, &timeout )) < 0 ) {
         return( -1 );
     }
+ /*
+ * FreeBSD 2.2.5 nozone hack by MXV of EFnet (mxv@iterate.com)
+ * fake successful NBPOP on timeout .. definitely dirty
+ */
     if ( cc == 0 ) {
- errno = ETIMEDOUT;
- return( -1 );
+ close( s );
+ return( 0 );
     }
 
     namelen = sizeof( struct sockaddr_at );

This leaves some odd side-effects when unregistering the names, but for
regular server use it's doing it's job, letting the server register itself
even as there are no routers/zones chattering on the network.

Hint: you might want to copy the VAX-icon over the default globe one in
afpd/icon.h before recompiling afpd .. will get you a cute BSD'ish devil on
your desktops keeping our flag high =)

// enjoy - MXV



This archive was generated by hypermail 2b28 : Sat Dec 18 1999 - 16:31:35 EST