david@ms.uky.edu (David Herron -- One of the vertebrae) (05/17/89)
On a Sun 3 running Sun OS v3.5 I'm running BIND v4.8 and came across a strange little problem. If I did not have an /etc/resolv.conf out there calls to res_send() would fail which I eventually tracked to the address being set to [0.0.0.0] (INADDR_ANY) and connect() didn't like this. This is set in res_init() as the initial value for the sin_addr.s_addr and isn't changed because /etc/resolv.conf wasn't there. But as soon as I put out an /etc/resolv.conf it worked fine. In retrospect perhaps we should always put out a resolv.conf file, but specify the local machine first on the list. But our practice has been to not do this on machines which run a named, only on machines which do not. It's worked fine for us until now on various systems like Ultrix v2.2, v3.0 Sun OS v3.4 Dynix v3 and possibly v2.something maybe Mt Xinu 4.3BSD I'm looking in the 4.3-tahoe "08.ipc" manual to see what it says about INADDR_ANY and see that it only talks about it in respect to packet reception -- that it allows packets to be received regardless of which of many IP addresses it might have been received from. The manual doesn't say a thing about sending packets to INADDR_ANY here or anywhere which I can see. So .. is this simply differences in interpretation or what? Why doesn't BIND set the default address to [127.0.0.1]? Why did it work fine on v3.4 and not on v3.5? (BTW, in neither case did we change the resolver library ...) -- <- David Herron; an MMDF guy <david@ms.uky.edu> <- ska: David le casse\*' {rutgers,uunet}!ukma!david, david@UKMA.BITNET <- By all accounts, Cyprus (or was it Crete?) was covered with trees at one time <- -- Until they discovered Bronze