Problem with getFlags() method in NetworkInterface.c

Chris Hegarty chris.hegarty at oracle.com
Thu Aug 9 04:25:59 PDT 2012


Shirish,

I am not familiar with VIPA interfaces, but I don't see any 
documentation that describes allowable values for flags that could cause 
the integer representing it to contain a negative value.

I'm not opposed to the source changes, I just don't see that they are 
required. Can you please help explain?

Thanks,
-Chris.

On 09/08/12 11:16, Shirish Kuncolienkar wrote:
> Hi,
>
> 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.  any calls like isUp() on
> such network interfaces would end up in a Socket Exception.
> I have patch for this.  Anyone would like to take a look ?
>
> http://cr.openjdk.java.net/~luchsh/webrev20120809/
>
> -Shirish
>



More information about the net-dev mailing list