Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!cornell!uw-beaver!rice!sun-spots-request From: slevy@nic.mr.net (Stuart Levy) Newsgroups: comp.sys.sun Subject: Re: FTP problem on 3/60's Message-ID: <8812171950.AA26770@nic.MR.NET> Date: 30 Dec 88 01:56:01 GMT Sender: usenet@rice.edu Organization: Sun-Spots Lines: 20 Approved: Sun-Spots@rice.edu Original-Date: Sat, 17 Dec 88 13:50:43 CST X-Sun-Spots-Digest: Volume 7, Issue 78, message 5 of 10 > 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