Subject: Re: [PATCH net-next v2 06/12] selftests: ncdevmem: Switch to AF_INET6

From: Stanislav Fomichev <[email-masked]>
Date: Thu, 3 Oct 2024 09:47:44 -0700

On 10/03, Mina Almasry wrote:
> On Mon, Sep 30, 2024 at 10:18 AM Stanislav Fomichev <[email-masked]> wrote:
> >
> > Use dualstack socket to support both v4 and v6. v4-mapped-v6 address
> > can be used to do v4.
> >
> 
> The network on test machines I can run ncdevmem on are ipv4 only, and
> ipv6 support is not possible for my test setup at all. Probably a mega
> noob question, but are these changes going to regress such networks?
> Or does the dualstack support handle ipv4 networks seamlessly?
> 
> If such regression is there, maybe we can add a -6 flag that enables
> ipv6 support similar to how other binaries like nc do it?

As long as your kernel is compiled with IPv6 (which all kernel in the
past 10+ years do) and you don't toggle net.ipv6.bindv6only sysctl to 1
(which defaults to 0 and afaik, none of the distros change it to 1),
AF_INET6 should properly support both v4 and v6 even if you don't have any
v6 environment setup.