[comp.protocols.appletalk] SunOS notes and patch 4 for CAP 6.0

djh@cs.mu.oz.au (David Hornsby) (04/08/91)

Various people seem to have problems with CAP 6.0 under SunOS.
Here are some points to watch out for and a patch for aarpd to
fix a problem where bogus bridge IP addresses can be generated
in /etc/etalk.local. The symptom is that NBP registration does
not work (eg: atistest, aufs etc fail).

I would like to point out that CAP 6.0 was developed and tested
on a SUN 4 under SunOS 4.0.3. Quite a few people have indicated
to me that they *do* have CAP 6.0 working fine under SunOS 4.1.1

As usual, you can send CAP problems or fixes to

	cap@munnari.OZ.AU

 - David.

SunOS Notes
-----------

1. In CAP 6.0 Native EtherTalk, you should use aarpd with interface
and zone-name arguments. The interface name will not necessarily be
the same for the NIT and enet interfaces, so it may appear that one
ethernet driver works and one doesn't.

2. In CAP 6.0 Native EtherTalk, you *MUST* run atis. The symptom of
not doing this is that nothing works!

3. CAP 6.0 is not a drop-in replacement for ru-cap, there are some
minor differences and these are detailed in the file install.ms in
the cap60/doc directory.

4. If you run Native EtherTalk, you should apply the following
patch to support/ethertalk/aarpd.c. It fixes a problem where in
some circumstances an invalid IP address is generated. Things
work if the IP address is seeded from an existing atalk.local
(and point to a valid gateway) or randomly gets set to 0.0.0.0


Patch #:	4
Type:		bug fix
Priority:	high
Affects:	CAP with Native EtherTalk (NBP registration fails)
Reported:	David Hornsby <djh@munnari.OZ.AU>
Archived:	munnari.OZ.AU	mac/cap.patches/cap60.patch004
Summary:	Bridge IP address in etalk.local must be 127.0.0.1
File:		cap60/support/ethertalk/aarpd.c

*** cap60/support/ethertalk/aarpd.c.orig	Wed Mar 13 19:34:49 1991
--- cap60/support/ethertalk/aarpd.c		Mon Apr  8 20:40:23 1991
***************
*** 13,18 ****
--- 13,19 ----
  #include <errno.h>
  #include <sys/file.h>
  #include <sys/types.h>
+ #include <arpa/inet.h>
  #include <netat/appletalk.h>
  #include <rpc/rpc.h>
  #include <rpc/svc.h>
***************
*** 26,31 ****
--- 27,33 ----
  extern void aarpdprog();		/* the RPC program interface	*/
  extern char interface[50];		/* which ethernet device	*/
  extern char this_zone[34];		/* zone for this host		*/
+ extern struct in_addr bridge_addr;	/* IP address for local bridge	*/
  extern byte bridge_node;		/* the local bridge		*/
  extern word bridge_net;			/* the local bridge		*/
  extern byte this_node;			/* this host node		*/
***************
*** 79,84 ****
--- 81,87 ----
  	openetalkdb(NULL);		/* open/create etalk.local */
  
  	nis_net = this_net = 0;		/* assume that we don't know */
+   	bridge_addr.s_addr = inet_addr("127.0.0.1");
  
  	baddr.node = bridge_node;	/* set bridge addr hint */
  	baddr.net = bridge_net;
***************
*** 260,265 ****
--- 263,269 ----
    bcopy(bad, &baddr, sizeof(baddr));
    bridge_node = baddr.node;
    bridge_net = this_net = nis_net = baddr.net;
+   bridge_addr.s_addr = inet_addr("127.0.0.1");
    etalkdbupdate(NULL);	/* write the info. back out */
    return((u_char *) &baddr);
  }