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
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
see full discussion on net-dev mailing list: