Re: InetAddress.getLocalHost() returns APIPA/link-local address in a Windows 2008 SP2 or later version Windows OS with multiple-NICs.

2011-12-19 Thread Alan Bateman
On 19/12/2011 03:25, Charles Lee wrote: Hi Alan, Here is fix of Microsoft: http://support.microsoft.com/kb/2621067 Thanks for the link. I guess I'm still surprised that APIPA addresses are returned by getaddrinfo, irrespective of the ordering. -Alan.

Re: InetAddress.getLocalHost() returns APIPA/link-local address in a Windows 2008 SP2 or later version Windows OS with multiple-NICs.

2011-12-18 Thread Charles Lee
On 12/07/2011 04:32 PM, Alan Bateman wrote: On 07/12/2011 06:58, Charles Lee wrote: Hi Chris, Sorry I can not give a *detailed* description :-P Have you successfully get an APIPA address? [1] is the link which describe they have get such addresses :-D The behaviour difference was introduced

Re: InetAddress.getLocalHost() returns APIPA/link-local address in a Windows 2008 SP2 or later version Windows OS with multiple-NICs.

2011-12-06 Thread Chris Hegarty
Charles, I still don't get this issue. getLocalHost first retrieves the local host name of the system, then does a lookup in the configured name service for this name. Is it possible for you to give detailed description of your machine setup/configuration and how you are encountering this

Re: InetAddress.getLocalHost() returns APIPA/link-local address in a Windows 2008 SP2 or later version Windows OS with multiple-NICs.

2011-12-06 Thread Charles Lee
Hi Chris, Sorry I can not give a *detailed* description :-P Have you successfully get an APIPA address? [1] is the link which describe they have get such addresses :-D The behaviour difference was introduced by the some latest patches from the Microsoft. And I am heard recently that they are

Re: InetAddress.getLocalHost() returns APIPA/link-local address in a Windows 2008 SP2 or later version Windows OS with multiple-NICs.

2011-12-01 Thread Alan Bateman
On 01/12/2011 01:13, Charles Lee wrote: Yes. In the customer scenario, the return value is 169.254.*.*/16 address. Sorry for all the questions but I'm still scratching my head as to how the lookup of the current host's name ends up with a list that includes these addresses. Is it definitely a

Re: InetAddress.getLocalHost() returns APIPA/link-local address in a Windows 2008 SP2 or later version Windows OS with multiple-NICs.

2011-12-01 Thread Chris Hegarty
On 01/12/2011 10:21, Alan Bateman wrote: On 01/12/2011 01:13, Charles Lee wrote: Yes. In the customer scenario, the return value is 169.254.*.*/16 address. Sorry for all the questions but I'm still scratching my head as to how the lookup of the current host's name ends up with a list that

Re: InetAddress.getLocalHost() returns APIPA/link-local address in a Windows 2008 SP2 or later version Windows OS with multiple-NICs.

2011-12-01 Thread Charles Lee
On 12/01/2011 06:21 PM, Alan Bateman wrote: On 01/12/2011 01:13, Charles Lee wrote: Yes. In the customer scenario, the return value is 169.254.*.*/16 address. Sorry for all the questions but I'm still scratching my head as to how the lookup of the current host's name ends up with a list that

Re: InetAddress.getLocalHost() returns APIPA/link-local address in a Windows 2008 SP2 or later version Windows OS with multiple-NICs.

2011-11-30 Thread Charles Lee
Hi Alan, Sorry for the late reply. Please see below: On 11/29/2011 05:47 PM, Alan Bateman wrote: On 29/11/2011 02:11, Charles Lee wrote: You are right. The ipv4 will appear in front of ipv6, but the order of ipv4 or ipv6 (separately) will not be sorted. Right, but it means that if the host

Re: InetAddress.getLocalHost() returns APIPA/link-local address in a Windows 2008 SP2 or later version Windows OS with multiple-NICs.

2011-11-29 Thread Alan Bateman
On 29/11/2011 02:11, Charles Lee wrote: You are right. The ipv4 will appear in front of ipv6, but the order of ipv4 or ipv6 (separately) will not be sorted. Right, but it means that if the host has at least one IPv4 address then it will be chosen and the IPv6 addresses will be ignored. I should

Re: InetAddress.getLocalHost() returns APIPA/link-local address in a Windows 2008 SP2 or later version Windows OS with multiple-NICs.

2011-11-28 Thread Alan Bateman
On 28/11/2011 06:52, Charles Lee wrote: Hi guys, When we call InetAddress.getLocalHost(), we usually return the first entry of inet address array. The array keeps the same order as getaddrinfo gets (duplication has been removed). In Windows 2008 sp2 or later version Windows OS with multiple

Re: InetAddress.getLocalHost() returns APIPA/link-local address in a Windows 2008 SP2 or later version Windows OS with multiple-NICs.

2011-11-28 Thread Charles Lee
On 11/28/2011 05:41 PM, Alan Bateman wrote: On 28/11/2011 06:52, Charles Lee wrote: Hi guys, When we call InetAddress.getLocalHost(), we usually return the first entry of inet address array. The array keeps the same order as getaddrinfo gets (duplication has been removed). In Windows 2008

InetAddress.getLocalHost() returns APIPA/link-local address in a Windows 2008 SP2 or later version Windows OS with multiple-NICs.

2011-11-27 Thread Charles Lee
Hi guys, When we call InetAddress.getLocalHost(), we usually return the first entry of inet address array. The array keeps the same order as getaddrinfo gets (duplication has been removed). In Windows 2008 sp2 or later version Windows OS with multiple NICs, getaddrinfo() sorts the Addresses