Request for Review: 6905552

Alan Bateman Alan.Bateman at Sun.COM
Wed Jan 27 08:02:51 PST 2010


Christopher Hegarty - Sun Microsystems Ireland wrote:
> :
> What we found is that on Solaris if an interface has only IPv6 
> addresses assigned to it, then you need to use a socket created with 
> AF_INET6 when querying the ioclt. By default, we always try to with an 
> AF_INET socket first and on Solaris fall back to try with an AF_INET6 
> socket if that fails (see L1533 in the new file).
>
> In the case that we are building without AF_INET6 defined it doesn't 
> make sense to try with an AF_INET6 socket if the ioctl fails with 
> AF_INET. Make sense? Is this what you were asking about?
That helps - I was mostly trying to understand what the behavior would 
be if we were compiled without IPv6 support but encountered a network 
interface that didn't have an IPv4 address plumbed. It looks like it 
will fail with an IOException with the error message from the ioctl. Now 
compare that with running today with java.net.preferIPv4Stack=true. I 
think today it will still create the IPv6 socket and return the MTU. 
It's probably not worth thinking about this as Solaris had had IPv6 
support in its header files since at least Solaris 8 and it's highly 
unlikely someone where compile this without AF_INET6 being defined.

-Alan.



More information about the net-dev mailing list