From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CA1BAF9DA; Wed, 19 Mar 2025 16:26:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742401601; cv=none; b=bUnuRVAdEjGnB1cWciQeTpNqnJHXVgHuyZTSKTpzArEyiMzM2ARgzHlKE59qxvgGkz01DhWFz/tPvWzKhJy+vQSG4ZIsmTsft7n2I97e1FE0rQMl8FcZ4b+IGQ0kcZBeWezwRs4opyF3af9HgoOEOvTe9bzx+9cwCgUoNTiqiww= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742401601; c=relaxed/simple; bh=+NovpqlAsquT1zXAI20hR5SbwnPIEjw5Mmy6/Kiav40=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=qjP65TCNz5czSQ1rRe7d3IQkYLFR+7i1Yge4NrDi2FK0inHef/o+5yXvjXWTIQu94crDr3/4mBVujzf95jdOZtgXAtHiydycJiVkTg09iTWDj8pROjrkryaj3TMLY86ehjMcqAD71SUqBZRol1fXhxGkezZMGcjSjLOtLlrZMrg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=KWTDSsnI; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="KWTDSsnI" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DD392C4CEED; Wed, 19 Mar 2025 16:26:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742401601; bh=+NovpqlAsquT1zXAI20hR5SbwnPIEjw5Mmy6/Kiav40=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=KWTDSsnI5C2ZqKFYak0Osm2PDSIaxivFspKsJdnfakhcGwSK+FBTOPxs7cmY3NDjc 25uBHPkoCouB5uT6NE3jjxEwzTY99Hj/lDd8voj2GgPCtgwWO7Kxopl/+B6IvaCOSO TqfdlASDzCL/p7HslkpKto8XZNXZEcWT1jJCA3pj+TrU1OBDylxjKdft8hsXscKfv+ qILPJC7ktoiqRHjuBs6te7UjuU2/4BQjNNyXpvx+CuynAr0r16oVDcakfexO0nN1OE +t3nFEBs4YvmixSf9lJzMMmoAuBN1VELxx6sL/WS4rznBOBHuh6aKH6+QkQjpEEoMg BpW3LeN5t8SyA== Message-ID: Date: Wed, 19 Mar 2025 17:26:35 +0100 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Beta Subject: Re: [PATCH net 2/3] mptcp: sockopt: fix getting IPV6_V6ONLY Content-Language: en-GB, fr-BE To: Simon Horman Cc: mptcp@lists.linux.dev, Mat Martineau , Geliang Tang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Florian Westphal , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org References: <20250314-net-mptcp-fix-data-stream-corr-sockopt-v1-0-122dbb249db3@kernel.org> <20250314-net-mptcp-fix-data-stream-corr-sockopt-v1-2-122dbb249db3@kernel.org> <20250319153827.GC768132@kernel.org> From: Matthieu Baerts Autocrypt: addr=matttbe@kernel.org; keydata= xsFNBFXj+ekBEADxVr99p2guPcqHFeI/JcFxls6KibzyZD5TQTyfuYlzEp7C7A9swoK5iCvf YBNdx5Xl74NLSgx6y/1NiMQGuKeu+2BmtnkiGxBNanfXcnl4L4Lzz+iXBvvbtCbynnnqD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nD/9YgbCr HR1FbMbm7td54UrYvZV/i7m3dIQNXK2e+Cbv5PXf19ce3XluaE+wA8D+vnIW5mbAAiojt3Mb 6p0WJS3QzbObzHNgAp3zy/L4lXwc6WW5vnpWAzqXFHP8D9PTpqvBALbXqL06smP47JqbyQxj Xf7D2rrPeIqbYmVY9da1KzMOVf3gReazYa89zZSdVkMojfWsbq05zwYU+SCWS3NiyF6QghbW voxbFwX1i/0xRwJiX9NNbRj1huVKQuS4W7rbWA87TrVQPXUAdkyd7FRYICNW+0gddysIwPoa KrLfx3Ba6Rpx0JznbrVOtXlihjl4KV8mtOPjYDY9u+8x412xXnlGl6AC4HLu2F3ECkamY4G6 UxejX+E6vW6Xe4n7H+rEX5UFgPRdYkS1TA/X3nMen9bouxNsvIJv7C6adZmMHqu/2azX7S7I vrxxySzOw9GxjoVTuzWMKWpDGP8n71IFeOot8JuPZtJ8omz+DZel+WCNZMVdVNLPOd5frqOv mpz0VhFAlNTjU1Vy0CnuxX3AM51J8dpdNyG0S8rADh6C8AKCDOfUstpq28/6oTaQv7QZdge0 JY6dglzGKnCi/zsmp2+1w559frz4+IC7j/igvJGX4KDDKUs0mlld8J2u2sBXv7CGxdzQoHaz lzVbFe7fduHbABmYz9cefQpO7wDE/Q== Organization: NGI0 Core In-Reply-To: <20250319153827.GC768132@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi Simon, Thank you for your review! On 19/03/2025 16:38, Simon Horman wrote: > On Fri, Mar 14, 2025 at 09:11:32PM +0100, Matthieu Baerts (NGI0) wrote: >> When adding a socket option support in MPTCP, both the get and set parts >> are supposed to be implemented. >> >> IPV6_V6ONLY support for the setsockopt part has been added a while ago, >> but it looks like the get part got forgotten. It should have been >> present as a way to verify a setting has been set as expected, and not >> to act differently from TCP or any other socket types. >> >> Not supporting this getsockopt(IPV6_V6ONLY) blocks some apps which want >> to check the default value, before doing extra actions. On Linux, the >> default value is 0, but this can be changed with the net.ipv6.bindv6only >> sysctl knob. On Windows, it is set to 1 by default. So supporting the >> get part, like for all other socket options, is important. >> >> Everything was in place to expose it, just the last step was missing. >> Only new code is added to cover this specific getsockopt(), that seems >> safe. >> >> Fixes: c9b95a135987 ("mptcp: support IPV6_V6ONLY setsockopt") >> Cc: stable@vger.kernel.org >> Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/550 >> Reviewed-by: Mat Martineau >> Signed-off-by: Matthieu Baerts (NGI0) > > Hi Matthieu, all, > > TBH, I would lean towards this being net-next material rather than a fix > for net. But that notwithstanding this looks good to me. I understand. This patch and the next one target "net" because, with MPTCP, we try to mimic TCP when interacting with the userspace. Not supporting "getsockopt(IPV6_V6ONLY)" breaks some legacy apps forced to use MPTCP instead of TCP. These apps apparently "strangely" check this "getsockopt(IPV6_V6ONLY)" before changing the behaviour with "setsockopt(IPV6_V6ONLY)" which is supported for a long time. The "get" part should have been added from the beginning, and I don't see this patch as a new feature. Because it simply sets an integer like most other "get" options, it seems better to target net and fix these apps ASAP rather than targeting net-next and delay this "safe" fix. If that's OK, I would then prefer if these patches are applied in "net". Or they can be applied in "net-next" if we can keep their "Cc: stable" and "Fixes" tags, but that looks strange. Cheers, Matt -- Sponsored by the NGI0 Core fund.