8209152: (so) ServerSocketChannel::supportedOptions includes IP_TOS

Alan Bateman Alan.Bateman at oracle.com
Tue Sep 4 18:12:58 UTC 2018


JDK-8209152 [1] is the issue about ServerSocketChannel::supportedOptions 
including IP_TOS in the set of supported options. Norman brought it up 
here a few weeks ago [2].

Digging into the history, it seems that changes in the networking area 
for JDK-8029607 [3] to fix the IPv6 traffic class handling in JDK 9 (and 
8ux40 and 7uX) changed ServerSocketChannel. It's not a significant issue 
as ServerSocketChannel doesn't document this option and setting it on an 
listener socket isn't really interesting anyway (esp. when 
StandardSocketOption does not define the behavior of this socket option 
on stream oriented sockets).

The changes to remove IP_TOS from the set are here:
    http://cr.openjdk.java.net/~alanb/8209152/webrev/index.html

I've included a test to query all socket options on the assumption that 
they can be queried on an unbound channel. This will at least catch 
cases where a channel claims to support a socket option that doesn't 
implement. The test restricts the set of platforms that it runs on 
because there are extended options, specific the SLA FLOW support on 
Solaris, that require special setup and aren't easy to exercise in tests 
that run on all platforms.

-Alan

[1] https://bugs.openjdk.java.net/browse/JDK-8209152
[2] http://mail.openjdk.java.net/pipermail/nio-dev/2018-August/005365.html
[3] https://bugs.openjdk.java.net/browse/JDK-8029607






More information about the nio-dev mailing list