Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-7190254

NetworkInterface getFlags implementation should support full integer bit range for flags value

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 8
    • 8
    • core-libs
    • b55
    • generic
    • linux

        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

              chegar Chris Hegarty
              chegar Chris Hegarty
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: