Date: Fri, 7 Feb 1997 12:35:50 +0100 (MET) From: luc.lewy@vz.cit.alcatel.fr (Luc.LEWY) To: roberto@eurocontrol.fr (Ollivier Robert) Cc: freebsd-current@freebsd.org Subject: Re: fetch and gethostbyname Message-ID: <199702071135.MAA19754@bcv64s3e.vz.cit.alcatel.fr> In-Reply-To: <19970207093535.OS29821@caerdonn.eurocontrol.fr> from "Ollivier Robert" at Feb 7, 97 09:35:35 am
next in thread | previous in thread | raw e-mail | index | archive | help
Ollivier Robert wrote: > I am able to resolve atena with all other tools of course. I've got the same problem with ircd 2.9.2 ( It's quite a bit different for me.. As in a config test, I don't have a DNS.. ) If I setup a DNS and use gethostbyname, that's okay.. If I just have NIS entry for hosts, ircd can't resolv its hostname (and idem for all clients comming from the local network) Here, at work, with SunOS 4.1.3, no DNS , only complete NIS maps entry... ircd can't resolv its hostname, neither clients hostname (on the local network) Gethostbyname return an errno > 0 in this configuration, h_errno is set to 0 and gethostbyname() return the correct info from NIS database .. Very often, boggus code check 'errno'.. and not 'h_errno' .. The correct test would be : if ( (hostentry=gethostbyname("foobar")) == NULL) { /* .. test h_errno here.. */ } errno=0; /* delete this boggus return code */ h_errno is define in /usr/include/netdb.h error code too.. fifi...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199702071135.MAA19754>