[RFR]: 8222562: IPv6 only systems fail on setsockopt(IPV6_V6ONLY, 0)
Arthur Eubanks
aeubanks at google.com
Mon Apr 22 18:19:37 UTC 2019
Here's a new webrev that entirely skips the setting of IPV6_V6ONLY option
to 0 if IPv4 isn't enabled.
http://cr.openjdk.java.net/~aeubanks/ipv6setsockopt/webrev.01/index.html
Right now the new ipv4_available() helper function is only used to check if
we should set IPV6_V6ONLY to 0, but in the future it could be used for
other things as well.
I'm not sure if the checks in ipv6_available() apply to IPv4 as well, so I
didn't bother copying those over to ipv4_available(). Plus as to not
potentially break existing systems with IPv4 support, false positives
for ipv4_available() would be preferable to false negatives.
Will run through submit repo, mostly to check that this doesn't break the
Windows build.
On Mon, Apr 22, 2019 at 9:29 AM Arthur Eubanks <aeubanks at google.com> wrote:
> It turns out these patches only apply to a modified kernel which has
>>> patches to turn off IPv4. This specific patch doesn't make sense to submit
>>> if the kernel patches are not upstream.
>>>
>>
>> I disagree a little.
>> Google may be decades ahead, but IPV4 being unsupported is a very
>> reasonable system configuration option that will eventually be part of
>> every OS.
>> Most of the time nonstandard kernels can be simulated for testing via
>> LD_PRELOAD interposing in front of libc, since we never talk to the kernel
>> directly.
>> And even if some changes can only be tested with Google's linux kernel
>> mods, that is still OK IMO.
>>
> When I said "this specific patch" I meant specifically checking
> for EAFNOSUPPORT. Some other form of this, such as not trying to set
> IPV6_V6ONLY to 0 when IPv4 is detected to not be working, may still make
> sense (and that's what I'm looking into). And yes that can be tested with
> LD_PRELOAD.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/net-dev/attachments/20190422/c828b3f3/attachment.html>
More information about the net-dev
mailing list