Re: IPv6 in Java on FreeBSD

From: <rb_at_gid.co.uk>
Date: Wed, 19 Feb 2025 13:37:09 UTC
Hi,

There are also security implications to this, see inet6(4).

> On 19 Feb 2025, at 13:25, Harald Eilertsen <haraldei@anduin.net> wrote:
> 
> Hi Bob,
> 
> On Wed, Feb 19, 2025 at 12:26:17PM +0000, Bob Bishop wrote:
>> I would just point out that back in history Java used to want mapped
>> IPv4 (net.inet6.ip6.v6only=0) if IPv6 was enabled; most people don’t
>> want that which may be why IPv6 support hasn’t been enabled.
> 
> That's really useful feedback! And the observation is still correct.
> Java will by default clear the IPV6_V6ONLY flag on sockets when IPv6 is
> available and requested (the default.)
> 
> I've made a quick test, where I patch Java to leave the setting alone,
> but otherwise leave IPv6 enabled. That will allow the sysctl setting to
> decide whether to use dual-socket or only accept IPv6 connections on the
> socket.
> 
> Personally I think that makes sense. I'll update the PR's accordingly.
> 
> Take care!
> Harald
> 

--
Bob Bishop
rb@gid.co.uk