[Fwd: Re: [kaffe] java.net.InetAddress.getAllByName returns wrong value for localhost]

Guilhem Lavaux guilhem@kaffe.org
Wed Sep 10 22:21:02 2003


This is a multi-part message in MIME format.
--------------000707030906000609030709
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit



--------------000707030906000609030709
Content-Type: message/rfc822;
 name="Re: [kaffe] java.net.InetAddress.getAllByName returns wrong value for localhost"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="Re: [kaffe] java.net.InetAddress.getAllByName returns wrong value for localhost"

Message-ID: <3F600578.100@kaffe.org>
Date: Thu, 11 Sep 2003 07:17:44 +0200
From: Guilhem Lavaux <guilhem@kaffe.org>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030313
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: Ito Kazumitsu <kaz@maczuka.gcd.org>
Subject: Re: [kaffe] java.net.InetAddress.getAllByName returns wrong value
 for localhost
References: <20030909155654.479.qmail@maczuka.gcd.org> <3F5E00C9.7060704@kaffe.org> <20030909224240.1661.qmail@maczuka.gcd.org> <20030910225448.1575.qmail@maczuka.gcd.org>
In-Reply-To: <20030910225448.1575.qmail@maczuka.gcd.org>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Ito Kazumitsu wrote:

>>>>>>"*" == Ito Kazumitsu <kaz@maczuka.gcd.org> writes:
>>>>>>            
>>>>>>
>
>*> It does not throw exception now.  But I would like to get 
>*> localhost/127.0.0.1 rather than localhost/::::::::1 .
>*> 
>*> I do not see why getHostByName returns an IPV6 address.
>
>Because getaddrinfo() returns both IPv4 and IPv6 addresses
>for "localhost" and IPv6 first.
>  
>
Ah, ok ! So maybe we should sort the addresses by type and put an IPV4 
address first.
I'll do it next week.

Cheers,
Guilhem.


--------------000707030906000609030709--