JDK-7190254 : NetworkInterface getFlags implementation should support full integer bit range for flags value
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 8
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: linux
  • CPU: generic
  • Submitted: 2012-08-09
  • Updated: 2014-09-26
  • Resolved: 2012-09-05
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7 JDK 8
7u40Fixed 8 b55Fixed
Description
The return value from the getFlags() method in NetworkInterface.c is interpreted in 2 ways.
  - If the value is negative an Exception is thrown
  - Else the return value is considered as the flag mask obtained via the 
    ioctl call.

In rare cases is it possible the value in the ifr_flags could be negative. One such case is VIPA interfaces on AIX. AIX defines VIPA interface flag as "0x80000000", any calls like isUp() on such network interfaces would end up in a Socket Exception.

Here is a similar bug report related to FreeBSD 
  http://hg.openjdk.java.net/macosx-port/macosx-port/jdk/rev/c6334146005c

see full discussion on net-dev mailing list:
  http://mail.openjdk.java.net/pipermail/net-dev/2012-August/004650.html

Comments
EVALUATION JDK8 Changeset: 399c2adf3ad6 Author: chegar Date: 2012-08-13 13:41 +0100 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/399c2adf3ad6 7190254: NetworkInterface getFlags implementation should support full integer bit range for flags value Reviewed-by: chegar Contributed-by: Shirish Kuncolienkar <###@###.###> ! src/solaris/native/java/net/NetworkInterface.c
13-08-2012

EVALUATION see description.
09-08-2012