RFR: 8293842: IPv6-only systems throws UnsupportedOperationException for several socket/TCP options [v2]

Man Cao manc at openjdk.org
Thu Sep 15 19:05:09 UTC 2022


> Hi all,
> 
> Could anyone review this bug fix for ipv6-only system? See https://bugs.openjdk.org/browse/JDK-8293842 for detailed description of this bug.
> 
> Ideally, the `socket(PF_INET6, ...)` or `socket(PF_INET, ...)` call should depend on the value of `ipv6_available()`. However, this is only easy to do in net_util_md.c. Without checking `ipv6_available()` in <Linux|MacOSX>SocketOptions.c, I'm not sure if it is possible for ipv6 and ipv4 sockets to differ in the options they support.
> 
> For example, for a system with both ipv6 and ipv4, if ipv6 supports TCP_KEEPIDLE but ipv4 does not, then there might be a problem to always report TCP_KEEPIDLE as supported. 
> 
> I noticed https://bugs.openjdk.org/browse/JDK-8290349 added "isIPv6" parameter to a few functions in <Linux|MacOSX>SocketOptions.c. However, it is not applicable to the `socketOptionSupported()` function. This change is more similar to the `Java_jdk_net_MacOSXSocketOptions_ipDontFragmentSupported0()` function.
> 
> -Man

Man Cao has updated the pull request incrementally with one additional commit since the last revision:

  Address comments

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/10278/files
  - new: https://git.openjdk.org/jdk/pull/10278/files/6a2c295b..64d767f4

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=10278&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=10278&range=00-01

  Stats: 11 lines in 3 files changed: 0 ins; 3 del; 8 mod
  Patch: https://git.openjdk.org/jdk/pull/10278.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/10278/head:pull/10278

PR: https://git.openjdk.org/jdk/pull/10278


More information about the net-dev mailing list