Received: by 2002:a05:7208:13ce:b0:7f:395a:35b6 with SMTP id r14csp1213048rbe; Fri, 1 Mar 2024 07:27:57 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXn5GpvRuDhg4bfy7zJVOiFUbdjnJ+f48+JcYzv08Y4xFQQ7sBdRzP4O/btU5Gm2Pz0NRr8hYyXCVi/12A+bEKifEBphPUY0zBFyDj0XA== X-Google-Smtp-Source: AGHT+IFTrbRRTGjewO/UVBjuaHcnS9qhSrmnBA0delkpQY9/1gCL8PjglCdLHrAMjpXydY+NtNvc X-Received: by 2002:a05:6e02:1d97:b0:365:1459:e1ed with SMTP id h23-20020a056e021d9700b003651459e1edmr2018836ila.4.1709306877436; Fri, 01 Mar 2024 07:27:57 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709306877; cv=pass; d=google.com; s=arc-20160816; b=buUmokFT+9Z4PbiFCIoiCaaVdHBIrBGdXt9c58muPt7BJrSCAw3Hh/vk7ShdCADMdC q/aArzUv1SVckQ0eQ/WeJF2bUbrmb5GDvww+q4/ceX1pqpROFrJJa6jrCrWtmfKZzx7J z/kgGH5HNsor4SNyAYhY+Ms6SgJ1XjdrAnWaHcbb/a+OZRcsMiAV6X3n4AMIcWX6dRVw fLL74XIxlpZK6kcRJgiUQxY9+qUXqMC/y77VbshsvSCv+JVtpbInl6vVlzZ2FiXk/I32 JbHX0VtetFHoY630ngANt1h9PoJzmEDq4PfMH+Vxxg9oEFc7g6PwkMMRD1N/fSDY2V3O eACg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=3qs4tgUUTOQOvgNZPnRZXHPfHMX/3W0DZm8/Tjo4l5k=; fh=cS+/MCLKQV65/lU7LF/qC1QamVHwsW23V/GP422rrxc=; b=HV+HDNIJ8opifTcPH6iIdr+KsS+Fj7MZkTpabBccfMkg1VyPxlxCiP9sFdD3i+HIQm wMBHaa5oegLVe0/2+wtif30hRM+WreZaL7ECl+0uIarjUIPcUqoNX8bkfc6IYmAwwbGU yCddLWPPdb+mn6KbV62TuyBO5sKy6eNowfKlJP5FRqYHlfOKlx8SziRtaynSnZe0J3hn pst3bm/QXf9+oU9i6xQW3clfZLoUywlKh+WCFDN/7bYrx08r0IGLgUU2i7M9InQE/T7q Ij/nWaVZCbKw0H70ouD2G8MeKU0vfQ/4kSBJG/SeNhoqSHMcylP0kXVI26L/6O3Ygxnc HX0w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kqMXvMaG; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-88619-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88619-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id f15-20020a63f10f000000b005dc0b1b0116si3794786pgi.119.2024.03.01.07.27.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 07:27:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-88619-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kqMXvMaG; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-88619-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88619-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 343FDB2307A for ; Fri, 1 Mar 2024 15:27:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7F65B6EF1D; Fri, 1 Mar 2024 15:27:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="kqMXvMaG" 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 A96C838DC3; Fri, 1 Mar 2024 15:27:42 +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=1709306862; cv=none; b=eUipSx8lhtodwgqFVfyFNQMaCetU1Gwl0xpGdCpZnfCsSI8vm95Ff0Y9nA7bjwZANo3NBOqSbCPXICh4Fc87MgXPAh7tfGoJgRA+ISc4SC2XoIfhh1ayNGEQhwH3idbaRgCCDPoZ2j2C7UKyCsnzpOV+odwXh8hTyCRwUOI+yW4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709306862; c=relaxed/simple; bh=wrD3glGEGSHzriZwlvphFHNZeyybi3nx+Chglm6H5Ww=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=aps8t1GiYWQvXz6EF5DSBbrsvw08MVhWZB+YMnxg2leVa6bdKTU2P3K+z/MkMVOB6D+BUi5Lc6YjiPqCxKBjORZ3qn2w4f+ppftOWlZof0dhaM+7IqcFeCL3sJIPhfgx+VC3X+OuVU/jku+xJu+ppgwA2RhK5Mpq26/M8yuaz/o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=kqMXvMaG; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id A9087C433F1; Fri, 1 Mar 2024 15:27:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709306862; bh=wrD3glGEGSHzriZwlvphFHNZeyybi3nx+Chglm6H5Ww=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=kqMXvMaGEMOROMXpmbH/+HtBHBdzi5ADfAH2yF3H4ZkYdQRj6itzbhtnt3q1tio63 Sx1lwAGtfQqyy7sTLW/u02oRaC9OZ7MVmH2Z7ymi/d4sMiJ2GBPCzvJtF7U2Rz63OK h0YG+RDSVYA6X7oP1kUzLWJAIz5Qslyj8xGu16PU40ZoTS7pzbBEUQ2AZftGoQG6Ne m5SrfnIHEjsp9zrW3VhYehhoQBKbcmCf2gHDYfoYHSEgKzZmfRTmnTv82AsbFTycA9 0eb2j18Ubfxsp4qflSExAP7qSWzYB3UKCBOT7DJmDfcu+32lTGLYsbeiV/lJw22hiI WhxKY5REPwG6Q== Message-ID: <177d3e62-2857-452b-bf42-e52587f825c6@kernel.org> Date: Fri, 1 Mar 2024 08:27:40 -0700 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net v4] ipv6: fib6_rules: flush route cache when rule is changed Content-Language: en-US To: =?UTF-8?B?TGVuYSBXYW5nICjnjovlqJwp?= , "kuba@kernel.org" , "davem@davemloft.net" , "edumazet@google.com" , "pabeni@redhat.com" , "jiri@resnulli.us" Cc: "linux-kernel@vger.kernel.org" , "netdev@vger.kernel.org" , =?UTF-8?B?U2hpbWluZyBDaGVuZyAo5oiQ6K+X5piOKQ==?= References: <09f2ab1b7946339da5092e10aa216e07c579c60b.camel@mediatek.com> From: David Ahern In-Reply-To: <09f2ab1b7946339da5092e10aa216e07c579c60b.camel@mediatek.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 3/1/24 7:39 AM, Lena Wang (王娜) wrote: > From: Shiming Cheng > > When rule policy is changed, ipv6 socket cache is not refreshed. > The sock's skb still uses a outdated route cache and was sent to > a wrong interface. > > To avoid this error we should update fib node's version when > rule is changed. Then skb's route will be reroute checked as > route cache version is already different with fib node version. > The route cache is refreshed to match the latest rule. > > Fixes: 101367c2f8c4 ("[IPV6]: Policy Routing Rules") > Signed-off-by: Shiming Cheng > Signed-off-by: Lena Wang > --- > v4: > - add "Fixes:" tag. > - update subject as requested. > v3: > - update patch description and name format in commit message. > v2: > - modify flush function same way as ipv4 flush cache. > - use tabs to aligh with existing code. > --- > --- > net/ipv6/fib6_rules.c | 6 ++++++ > 1 file changed, 6 insertions(+) > Reviewed-by: David Ahern