[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200519194710.GP2491@localhost.localdomain>
Date: Tue, 19 May 2020 16:47:10 -0300
From: Marcelo Ricardo Leitner <marcelo.leitner@...il.com>
To: David Laight <David.Laight@...lab.com>
Cc: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-sctp@...r.kernel.org" <linux-sctp@...r.kernel.org>,
Neil Horman <nhorman@...driver.com>
Subject: Re: sctp doesn't honour net.ipv6.bindv6only
On Tue, May 19, 2020 at 10:47:17AM +0000, David Laight wrote:
> The sctp code doesn't use sk->sk_ipv6only (which is initialised
> from net.ipv6.bindv6only) but instead uses its own flag
It actually does, via [__]ipv6_only_sock() calls since 7dab83de50c7
("sctp: Support ipv6only AF_INET6 sockets.").
> sp->v4mapped which always defaults to 1.
>
> There may also be an expectation that
> [gs]etsockopt(sctp_fd, IPPROTO_IPV6, IPV6_V6ONLY,...)
> will access the flag that sctp uses internally.
> (Matching TCP and UDP.)
My understanding is that these are slightly different.
v4mapped, if false, will allow the socket to deal with both address
types, without mapping. If true, it will map v4 into v6.
v6only, if false, it will do mapping for tcp/udp, but sctp won't use
it. If true, it will deny using v4, which is complementary to v4mapped
for sctp.
Did I miss anything?
Marcelo
Powered by blists - more mailing lists