FTP problem on 3/60's

Stuart Levy slevy at nic.mr.net
Fri Dec 30 11:56:01 AEST 1988


> We had this problem when a ypclient machine did not have its own host name
> in its own version of /etc/hosts.  This also disabled the "talk" program.
> To fix, add the host name to /etc/hosts and reboot.  Apparently, something
> in the kernel looks at /etc/hosts at boot time.

What's happening here is that the reverse-ARP code, which diskless Suns
use to find their addresses at boot time, is sloppy.  The address is
stored in a 16-byte struct sockaddr_in, including a 4-byte internet
address and 8 bytes of zero padding.  The RARP code fills in the IP
address but doesn't zero the 8 pad bytes.  This works for many things, but
if you try to bind() a socket to a specific IP address as ftpd and talkd
do, it fails unless those pad bytes are really zero.

They normally get cleared by the "ifconfig ??0 $hostname" in /etc/rc.boot.
But if the local /etc/hosts doesn't list whatever you have for hostname --
or if it does list it but at an IP address *different* from the one picked
up by the RARP code -- the ifconfig fails, and ftpd etc. report strange
errors.

	Stuart Levy



More information about the Comp.sys.sun mailing list