[erlang-questions] Broken ipv6 behavior?
Tony Rogvall
tony@REDACTED
Wed Apr 9 03:30:06 CEST 2008
Ok.
When you do it from the prompt you need some more things.
inet_db:set_lookup([file,dns]). %% NOT files
then you need to (re)load the host list:
inet_db:add_hosts("/etc/hosts").
now it should work.
Well I guess you want to check why the native version does not work, and
possibly put the stuff in an rc file.
/Tony
On 9 apr 2008, at 03.14, Matthew Dempsky wrote:
> Okay, so now that breaks looking up localhost:
>
> matthew@REDACTED:/tmp$ erl -kernel inetrc '"/tmp/inetrc"'
> Erlang (BEAM) emulator version 5.6.1 [source] [smp:2]
> [async-threads:0] [kernel-poll:false]
>
> Eshell V5.6.1 (abort with ^G)
> 1> inet_db:set_lookup([dns]).
> ok
> 2> inet_db:add_ns({10,0,1,40}).
> ok
> 3> inet:getaddr("ipv6.google.com", inet6).
> {ok,{8193,18528,0,4097,0,0,0,104}}
> 4> inet:getaddr("localhost", inet).
> {error,nxdomain}
> 5> inet:getaddr("localhost", inet6).
> {error,nxdomain}
>
> Looking at my DNS cache logs, Erlang is now sending queries for
> localhost.local.
>
> If I change [dns] to [files, dns], and it gives the same wrong output.
> (I also tried adding "9.9.9.9 localhost.local" to /etc/hosts, and it
> still gives nxdomain.)
>
>
> On Tue, Apr 8, 2008 at 5:40 PM, Tony Rogvall <tony@REDACTED> wrote:
>> I you do this:
>>
>> inet_db:set_lookup([dns]).
>> inet_db:add_ns({A,B,C,D}). %% Name server must be IPv4, there is a
>> fixme
>> in inet_db.
>>
>> inet:getaddr("ipv6.google.com", inet6).
>> {ok,{8193,18528,0,4097,0,0,0,104}}
>>
>>
>> /Tony
>>
>>
>> On 9 apr 2008, at 01.42, Matthew Dempsky wrote:
>>
>>
>>
>>> On Tue, Apr 8, 2008 at 4:22 PM, Tony Rogvall <tony@REDACTED>
>>> wrote:
>>>
>>>> Make sure the {inet6, Bool} in the inetrc is set to true?
>>>>
>>>> See ERTS User's Guide / Inet configuration.
>>>>
>>>
>>> Makes no difference. DNS cache still only shows an A query.
>>>
>>> matthew@REDACTED:/tmp$ echo '{inet6, true}.' > inetrc
>>> matthew@REDACTED:/tmp$ erl -kernel inetrc '"/tmp/inetrc"'
>>> Erlang (BEAM) emulator version 5.6.1 [source] [smp:2]
>>> [async-threads:0] [kernel-poll:false]
>>>
>>> Eshell V5.6.1 (abort with ^G)
>>> 1> inet:getaddr("ipv6.google.com", inet6).
>>> {error,nxdomain}
>>>
>>
>>
More information about the erlang-questions
mailing list