Strange behaviour of inet_res:getbyname

Alexey Shchepin alexey@REDACTED
Wed Nov 10 15:38:55 CET 2004


Hi!

There is strange behaviour of inet_res:getbyname/2 when it called from node
with long name, short name, and without name.

Without node name it immediately returns {error,timeout}:

$ erl
Erlang (BEAM) emulator version 5.4 [source] [hipe] [threads:0]

Eshell V5.4  (abort with ^G)
1> inet_res:getbyname("_xmpp-server._tcp.jabber.ru", srv). 
{error,timeout}

The same with sort node name:

$ erl -sname test
Erlang (BEAM) emulator version 5.4 [source] [hipe] [threads:0]

Eshell V5.4  (abort with ^G)
(test@REDACTED)1> inet_res:getbyname("_xmpp-server._tcp.jabber.ru", srv).
{error,timeout}

And it works as expected with long node name:

$ erl -name test
Erlang (BEAM) emulator version 5.4 [source] [hipe] [threads:0]

Eshell V5.4  (abort with ^G)
(test@REDACTED)1> inet_res:getbyname("_xmpp-server._tcp.jabber.ru", srv).
{ok,{hostent,"_xmpp-server._tcp.jabber.ru",[],srv,1,[{0,0,5269,"jabber.ru"}]}}

It seems this problem appeared in R10B.



More information about the erlang-bugs mailing list