[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: nslookup's Server: 0.0.0.0 but resolves correctly
From:       Steven Honeyman <stevenhoneyman () gmail ! com>
Date:       2014-10-25 23:38:44
Message-ID: CABz95_DHZ2R1DfXdCoDxtH0Mt-Ycs0Cor2zGHsanYM6OB4Eg8Q () mail ! gmail ! com
[Download RAW message or body]

On 26 October 2014 00:20, Steven Honeyman <stevenhoneyman@gmail.com> wrote:
> On 25 October 2014 23:30,  <stroblsw@gmail.com> wrote:
>>>
>>> $ /usr/local/bin/busybox nslookup example.com
>>> Server:    (null)
>>> Address 1: (null)
>>> Address 2: 127.0.0.1 localhost.localdomain
>>>
>>> Name:      example.com
>>> Address 1: (null)
>>> Address 2: 93.184.216.119
>>
>> okay, it's not just bionic but musl too.
>>
>> the musl resolution looks particularly evil with address1 being null.
>> I didn't dare to suggest this before but if musl was trying to resolve
>> the IPv6 address there to null then maybe this bug is related to
>> ENABLE_FEATURE_IPV6
>
> Hmm, maybe the opposite?
>
> $ /usr/local/bin/busybox bbconfig | grep IPV6
> # CONFIG_FEATURE_IPV6 is not set
> # CONFIG_FEATURE_IFUPDOWN_IPV6 is not set
> $ /usr/bin/busybox bbconfig | grep IPV6
> CONFIG_FEATURE_IPV6=y
> CONFIG_FEATURE_IFUPDOWN_IPV6=y
>
> <change config and recompile musl version>
>
> $ ./busybox-ipv6 nslookup example.com
> Server:    (null)

Oh... I just had a look at the source(s)... here is what doesn't look promising:

busybox:

 35  * This applet is the only user of res_init(). Without it,
 36  * you may avoid pulling in _res global from libc.

126         sa = (struct sockaddr*)&_res.nsaddr_list[0];
127     server = xmalloc_sockaddr2dotted_noport(sa);

musl:

 24
 25 /* unused; purely for broken apps */
 26 typedef struct __res_state {
 27     int retrans;
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic