gethostbyname/1 on Freebsd

Olivier olivier@REDACTED
Thu Oct 16 14:13:47 CEST 2003


	hi all,

	i'm having problems with gethostbyname/1 on FreeBSD:

1> inet:gethostbyname("localhost").
{ok,{hostent,"localhost",["naboo.dolphian.priv","naboo"],inet,4,[{127,0,0,1}]}}
2> inet:gethostbyname("naboo").
{ok,{hostent,"localhost",["naboo.dolphian.priv","naboo"],inet,4,[{127,0,0,1}]}}
3> inet:gethostbyname("haruki").
{error,nxdomain}

	/etc/resolv.conf is ok:
search dolphian.priv
nameserver 192.168.100.1

$ host haruki
haruki.dolphian.priv has address 192.168.100.239

	same configuration on a linux box works as expected:

1> inet:gethostbyname("penelope").
{ok,{hostent,"penelope.dolphian.priv",[],inet,4,[{192,168,100,173}]}}

	any idea ? erlang is:

Erlang (BEAM) emulator version 5.3 (installed from the ports)

	thanks in advance,

--
olivier




More information about the erlang-questions mailing list