Received: by 2002:a05:7208:13ce:b0:7f:395a:35b6 with SMTP id r14csp1213496rbe; Fri, 1 Mar 2024 07:28:49 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCU+ESk3J7bf+kXbPwgGcgXPDVwRtJZNmwZU42XmyL+jzwFPvFpzAjEZ/GB9w7nGYOo6YZNRvYXRDTrW8o0BtjWqSgLOzMaa6/8AVHx1WA== X-Google-Smtp-Source: AGHT+IFW/OsH8yj+r60YJbRQcm9HPLRUh7Iz1Lw3qRK2U8y1Qn8HJ4s585FlDzD1cQTVFSYunfGS X-Received: by 2002:ae9:e511:0:b0:787:fd8e:6195 with SMTP id w17-20020ae9e511000000b00787fd8e6195mr1965309qkf.51.1709306929041; Fri, 01 Mar 2024 07:28:49 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709306929; cv=pass; d=google.com; s=arc-20160816; b=D6+POVMUPLDUZ9nVaeTHipbkdIyzB/lT7gGOY//ecPfnIe6lJ+5B56V8Tc12+wG/JY NpZU0g6EovG5aSOd0rp4JaM0pOvRJ4/dEHrN266PkSXqd2XR7KBKKLUZZYmu2JbAmf+4 gxiHfrb6qz7EthGQl5CHCKfTnCuAHERkjiEA+8lvLJKS4cKnl8WKwN/oBcNKiqN45EFI ybwZRjmThjStLgyfhxJKy8L1XYD0HZ61a4UyEewRjz7kxYN4HiBWYJoUmZCIoY3KSWnf OS5CNkim9IrRd1RPKY5+Rulo1Ktl2et7rzG05n54OEL8iGoBk5XaYAdC6nKIVhZx4Jng kPgA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=u4F02pEdXW7O5AZ78s2XrXcj0l17Khc03uRgcPoaIdI=; fh=4zyHqEUBvfM+A0BFevu3uJd8DxUXbMhXaKVS13z0SAU=; b=BYwkB9Jcr3DZcOHKW3se+SDWYjflr8Fkatp0lMc2ZcQFoQIAQZWZ8nKNLfnfyECEA/ bcz2HQq8sb5DuDeaWnfhf0N8nsLLJ7NtZuQKLUccFpEMBBkExRoHNna3aeM0VxrRC3BS n1okSxy8lXszJOVqKwqc4Z1QZNVttTF6mUG7uDtXqNoBwpeCsNRNUvQVLjWyPfFKyqkS OI+AWAZEq51Y7/NRR0jvjb9yGrZouc78zk7liZhdz47F2CM6+N5W/7AqKhKkrGm2YA0/ dKT2z2jJvLIyi8vulxz8PVOuRK82Pl3i54QvGTodlwEEQaBbIDoZ2fSXEu6xaEpApYBJ O/6w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@resnulli-us.20230601.gappssmtp.com header.s=20230601 header.b=jixSf8hM; arc=pass (i=1 dkim=pass dkdomain=resnulli-us.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-88620-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88620-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d24-20020a05620a205800b00787be694972si3772637qka.666.2024.03.01.07.28.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 07:28:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-88620-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@resnulli-us.20230601.gappssmtp.com header.s=20230601 header.b=jixSf8hM; arc=pass (i=1 dkim=pass dkdomain=resnulli-us.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-88620-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88620-linux.lists.archive=gmail.com@vger.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 549501C22FB9 for ; Fri, 1 Mar 2024 15:28:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0F82E38DC3; Fri, 1 Mar 2024 15:28:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=resnulli-us.20230601.gappssmtp.com header.i=@resnulli-us.20230601.gappssmtp.com header.b="jixSf8hM" Received: from mail-ej1-f41.google.com (mail-ej1-f41.google.com [209.85.218.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C6F6539FCF for ; Fri, 1 Mar 2024 15:28:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709306916; cv=none; b=WOIyAWQ4Ow2GhFeKaJVGm7X2XYRvIzyyJ8UQ68egUPWWxHiRUSLC5WrfYNAiIeQogxJ4n4vk1hc5cf5rXFWtZitDgXaTXTrGvgdTkmow063I5hlwrSivqjFEB1saIJ9V+QKvQsQHprS2jWHeKlg7BZjAQnyEE5jkfyD93Fq52fU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709306916; c=relaxed/simple; bh=u4F02pEdXW7O5AZ78s2XrXcj0l17Khc03uRgcPoaIdI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=EWj+u2SIBS8hwxaAW1H74ldgQGJFGcwhCYvjJxF+T7b15A6Z/L0vdSBVSsMRF3SP5lEBfQ7xcaByy60fGW9b9e7kDID1CwDSzn54E+ofd7nELRezjMeMYSoymDtnj2o0UJwKOQnSToVGFsCHg9R9j1TkegezCCxj+0hyghfx7aA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=resnulli.us; spf=none smtp.mailfrom=resnulli.us; dkim=pass (2048-bit key) header.d=resnulli-us.20230601.gappssmtp.com header.i=@resnulli-us.20230601.gappssmtp.com header.b=jixSf8hM; arc=none smtp.client-ip=209.85.218.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=resnulli.us Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=resnulli.us Received: by mail-ej1-f41.google.com with SMTP id a640c23a62f3a-a36126ee41eso363990366b.2 for ; Fri, 01 Mar 2024 07:28:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=resnulli-us.20230601.gappssmtp.com; s=20230601; t=1709306912; x=1709911712; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=u4F02pEdXW7O5AZ78s2XrXcj0l17Khc03uRgcPoaIdI=; b=jixSf8hMmbfZNZBOX9z3bebEydzN65R3P98GZxRdGiZbX5DNjG/phA+7unYnDhcxo5 MeoFlgVW+iaZjeTFrmb/0Hr2kscUBmmfIHETYS5cRvfyLSCKhvjdhxnqjk5+Mzfj3N2C wVTkGri1S+d+KcVUodjRETNbUruQhNFmjkLux2YY1T9oV2ZKR3U27DsNJ8xQXDfXHz75 7pNMsl2OzDoKvj1VhGN7PMcMT1srq20hv2rEKXA/61g4CRtqj+cOleKL8Dqq+ouz8BHm B3NhShVDD116LYkKF+/AHWjpeawIoSgNST4A3dNoZeP39j+TlkBdjrA30s8lqCpZMBHv reLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709306912; x=1709911712; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=u4F02pEdXW7O5AZ78s2XrXcj0l17Khc03uRgcPoaIdI=; b=XUdX1Uabc5bpoVUPvWQDi6HFGEoVxuM4jzWb6xlGf5aCTDibO84P6wX9fwaNcxJERU cHG55VLMxa+w+DMGHwTqM91qFhib4ud2oSDL4rDKj9u3LPkrnAgpPLzE61a6YGQcVuLT GbNfNbTdONVKPD47DaUAiy7/PLLyEvQnT2ErGF4I+vrsGf9fbGbpcXazEyQU0FmqmGiB Zau5Jo07hy+jxS26DFXy4neDyjM0NfdaHR+oTmCBFV4vylEIcjwoiiRCyGAsv/3GxBmf QIe7CP2rswLldZXP1jBq33vKoT31sSpCW8Ea6xm/o7WaNi7yuLLs/O1EgozLr6ZIJ4oG KZWg== X-Forwarded-Encrypted: i=1; AJvYcCV8TcvLRdKm+L7gxI1KLGq/XFG8j334rCgd3ZlJWpC8xrC+KaqNSqsHTGifQJw+e480Zfl+SnyOSgOGjhgz4ZJxmWkryR+6f7mDM2Y4 X-Gm-Message-State: AOJu0Yz9tI+i4X8YHWA806dPnoyOgy/Z93WVaQ+O8s4x6UbBUxnHCB7k EMI1DZ/Zgexj3VbjtAWE3AkmRIlCWvUa8OHsYG3cMXqOvE5cVVH3uSV8Ikebal8= X-Received: by 2002:a17:906:5f90:b0:a44:29a4:46fb with SMTP id a16-20020a1709065f9000b00a4429a446fbmr1466238eju.16.1709306911814; Fri, 01 Mar 2024 07:28:31 -0800 (PST) Received: from localhost ([193.47.165.251]) by smtp.gmail.com with ESMTPSA id f26-20020a170906139a00b00a4417c46efbsm1779936ejc.82.2024.03.01.07.28.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 07:28:30 -0800 (PST) Date: Fri, 1 Mar 2024 16:28:27 +0100 From: Jiri Pirko To: Lena Wang =?utf-8?B?KOeOi+WonCk=?= Cc: "kuba@kernel.org" , "davem@davemloft.net" , "edumazet@google.com" , "pabeni@redhat.com" , "dsahern@kernel.org" , "linux-kernel@vger.kernel.org" , "netdev@vger.kernel.org" , Shiming Cheng =?utf-8?B?KOaIkOivl+aYjik=?= Subject: Re: [PATCH net v4] ipv6: fib6_rules: flush route cache when rule is changed Message-ID: References: <09f2ab1b7946339da5092e10aa216e07c579c60b.camel@mediatek.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <09f2ab1b7946339da5092e10aa216e07c579c60b.camel@mediatek.com> Fri, Mar 01, 2024 at 03:39:46PM CET, Lena.Wang@mediatek.com 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 Reviewed-by: Jiri Pirko