United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 6456276 VISTA: api/java_net/NetworkInterface/index.html#static fails.
6456276 : VISTA: api/java_net/NetworkInterface/index.html#static fails.

Details
Type:
Bug
Submit Date:
2006-08-02
Status:
Resolved
Updated Date:
2010-04-02
Project Name:
JDK
Resolved Date:
2006-10-27
Component:
core-libs
OS:
windows_vista
Sub-Component:
java.net
CPU:
generic
Priority:
P2
Resolution:
Fixed
Affected Versions:
5.0u8
Fixed Versions:
5.0u11

Related Reports
Backport:
Relates:

Sub Tasks

Description
The following jck test fails on vista with tiger (passes with mustang):

  api/java_net/NetworkInterface/index.html#static

  NetworkInterface2001: Failed. public static NetworkInterface
  getByInetAddress(InetAddress addr) throws SocketException Test Failed
  NetworkInterface2002: Passed. OKAY
  STATUS:Failed.test cases: 2; passed: 1; failed: 1; first test case failure:  
  NetworkInterface2001

  >>> irevista/129.156.232.46
  >>> irevista/fe80:0:0:0:90bf:ee1e:be3b:f8a8
  Returned NetworkInterface for address irevista/fe80:0:0:0:90bf:ee1e:be3b:f8a8 is null

                                    

Comments
EVALUATION

Do not use scopeid in NetworkInterface implementaion when determining equality.
                                     
2006-10-13
EVALUATION

The problem is that Inet6Address objects returned from InetAddress.getByName and getAllByName do not have their scopeid set. NetworkInterface.getByInetAddress uses the scopeid as well as the address to determine if the InetAddress being passed in is equals the address on one of the systems interfaces. As the scopeid is not being set in these objects being passed to NetworkInterface.getByInetAddress, a matching interface is never found. 

To fix this we simply remove the equality on scopeids from NetworkInterface.getByInetAddress.

NOTE: THIS DOES NOT OCCUR WITH MUSTANG. In mustang InetAddress.get(All)ByName retruns Inet6Addresses that have their scopeid values set where applicable.
                                     
2006-08-02



Hardware and Software, Engineered to Work Together