Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1398008rwb; Thu, 8 Dec 2022 10:06:06 -0800 (PST) X-Google-Smtp-Source: AA0mqf6t4a4FEccBfUEmobGNoQ+RNh36Oabku2XY963j9yiLhSEqNgyh4ORaKZQ/jBM01giNJU9Q X-Received: by 2002:a05:6402:2948:b0:463:bc31:2604 with SMTP id ed8-20020a056402294800b00463bc312604mr83935061edb.32.1670522765786; Thu, 08 Dec 2022 10:06:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670522765; cv=none; d=google.com; s=arc-20160816; b=wPMNoGd+Opf4ngAfgu+6MDWHknU25FO7XCf7FsMJDdYDoR0w+vVgjZwmdGVOUlEcDE jQaoZTZg0RxIHUAQRVEE/3LAOjr3d1BKd+6BHNs37gXhtj1t7F7FuT4jV9xJMChSTc6T H+301e7MEnEVK/4VrJ8BanaBDALsy5DmMPlWHmDNZxrYJhU1iVJd6WtmQed19idP75S4 R8tMgvvbHDyE26p+HC4slfiiNrqVetCXG2mejznzz1nC9PuyHYVWToJw5Tzh7LUmOv0X N+y7+zHRKWTET7fRNPw9iL3kDd5KKohajDQZzlna+LNi3fShEOvjoVHZsaCxLmIaGY2R wEUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:to:content-language:subject:user-agent:mime-version:date :message-id:dkim-signature; bh=U7aumu9qVsvzwLm0HBTZDo7QuxlT+9PhBLGdy4Rqey8=; b=SGz6hpMxr7gIZSlmAhLVnsHTnXAGbf0G53+MOOKLNXSFGdGJjEXc376n/oCkCbchEA yrlpk23GGhXERlbfxn2WLtQhen0XKampV/ublsMxUiSy8M4jiQc4QUOiuzz7FBZVGfpN KIqwg2oA0yCfeobTSYnq+VSGtmluQpVM+ngyG3cQsvvsGapT0pjXjhJ2qjEIJP6T0dbq 8uoLhL4hT1IULjOQjUmg5mELgRFmEy0tpyYuCY0Mix/MHuSBxY/cah0EN9Xjr6wIfrg0 DHW9dRzqbJfhrTOTfCd81OlRxDbLHpwsOxYSi1QDUl8gyQkBAVrnYKoWTu7hEN8dIpk3 806Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=V8qzq44V; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dp20-20020a170906c15400b007c0bc7057ddsi8787945ejc.909.2022.12.08.10.05.47; Thu, 08 Dec 2022 10:06:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=V8qzq44V; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229821AbiLHRmn (ORCPT + 73 others); Thu, 8 Dec 2022 12:42:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50750 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229770AbiLHRmj (ORCPT ); Thu, 8 Dec 2022 12:42:39 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 10E6828B; Thu, 8 Dec 2022 09:42:32 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 6C47A62010; Thu, 8 Dec 2022 17:42:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 73A4DC433F0; Thu, 8 Dec 2022 17:42:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670521351; bh=utdMMEDMbfjfANs9F7ogpyQ+wApNaZHIFkDzje1WJv8=; h=Date:Subject:To:References:From:In-Reply-To:From; b=V8qzq44Vq/8QwTdsjTYOhe3MIneNOz5L12HbgDnpv0/TeTKU6mwkibRz0j89hW/Ae g156wOzaGlx2DLdlcfgB4sQGHeBCMs22tRxwPJVkXA1p9KfFv54XmBXg3bmqfkZ44s vX3e+qnRsEoDqkqgt62wcfGAwd5QJhqP60C5ErSFa878dR2hh3gdXUyBMKf19K8Mkg yjYsowlsvjJxDf9G8Uj+Go6xmuDylsjfLE66Jo01yxsNX0J6RU+9a383mk3uoY7Kvw kIsYvaG7ageK9CPy3o3RuYdlHFBx/PV98CGQONTGSYIa12SppxGF74oQUd+jQ90XNY T3BMGwkB7RgTQ== Message-ID: <7b510e87-3a34-d9c8-a9e9-65c1d93ad645@kernel.org> Date: Thu, 8 Dec 2022 10:42:30 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 Subject: Re: [PATCH v2] net: setsockopt: fix IPV6_UNICAST_IF option for connected sockets Content-Language: en-US To: Richard Gobert , davem@davemloft.net, yoshfuji@linux-ipv6.org, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <20221208145437.GA75680@debian> From: David Ahern In-Reply-To: <20221208145437.GA75680@debian> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/8/22 7:54 AM, Richard Gobert wrote: > Change the behaviour of ip6_datagram_connect to consider the interface > set by the IPV6_UNICAST_IF socket option, similarly to udpv6_sendmsg. > > This change is the IPv6 counterpart of the fix for IP_UNICAST_IF. > The tests introduced by that patch showed that the incorrect > behavior is present in IPv6 as well. > This patch fixes the broken test. > > Reported-by: kernel test robot > Link: https://lore.kernel.org/r/202210062117.c7eef1a3-oliver.sang@intel.com > Fixes: 0e4d354762ce ("net-next: Fix IP_UNICAST_IF option behavior for connected sockets") > > Signed-off-by: Richard Gobert > --- > net/ipv6/datagram.c | 15 ++++++++++----- > 1 file changed, 10 insertions(+), 5 deletions(-) > Reviewed-by: David Ahern