Article View: linux.kernel.netdev
Article #2784Re: [PATCH net 1/1] ovpn: avoid caching stale IPv6 dst after FIB changes
From: David Ahern
Date: Tue, 13 Oct 2026 13:52
Date: Tue, 13 Oct 2026 13:52
22 lines
6678 bytes
6678 bytes
On 10/8/26 6:33 PM, Antonio Quartulli wrote: > You're right that a cached dst can go stale later and that reuse-time > validation handles that. This case is different, because it breaks > reuse-time validation. > > dst_cache_set_ip6() samples the cookie itself: > > dst_cache_per_cpu_dst_set(idst, dst, > rt6_get_cookie(dst_rt6_info(dst))); > > rt6_get_cookie() only returns a route-tied value when rt->sernum is > non-zero, which happens in ip6_rt_pcpu_alloc() and only for nexthop > routes. Everything else reads the current node generation: > > *cookie = READ_ONCE(fn->fn_sernum); Have you tried setting sernum for all dst_entry when they are created? This deferred reading of fn_sernum seems to be the problem. fib entries have sernum set. dst_entries are created from the fib entries and should carry the sernum from the fib entry at that moment.
Technical Details
Message-ID:
<76f16ff2-3102-44e9-b4e0-5818044bbc75@kernel.org>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-345655-linux-kernel-netdev=dewy.ruReferences:
<0c6f073c-12c7-4843-846e-69c48c290107@kernel.org> <20260929150454.466148-1-ralf@mandelbit.com> <375bc468-fb28-4620-a5c8-0f7ba9e693d6@openvpn.net>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-345655-linux-kernel-netdev=dewy.ru From: dsahern@kernel.org (David Ahern) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net 1/1] ovpn: avoid caching stale IPv6 dst after FIB changes Date: Tue, 13 Oct 2026 07:52:29 -0600 Organization: Usenet Network Message-ID: <76f16ff2-3102-44e9-b4e0-5818044bbc75@kernel.org> References: <0c6f073c-12c7-4843-846e-69c48c290107@kernel.org> <20260929150454.466148-1-ralf@mandelbit.com> <375bc468-fb28-4620-a5c8-0f7ba9e693d6@openvpn.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="2078128"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:7V8+JgdgNb85vtnZiePf7Yh/Tww= sha256:XbP/ma3lPcWnOaASx9s6U3KGHlwNbrexygAHFwGqyFQ= sha1:E/uPADqBKlGwHZ3cF7B2aoSVHCI= sha256:RRDysEZ/m1ohRzEmxj1d3nyXjtIzw/f1HxhMLLOPjJA= Content-Language: en-US List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id E493010FE53; Tue, 13 Oct 2026 17:38:53 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.64 X-Spam-Status: No, score=-3.64 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.24, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id a8VKugHR1Ezn; Tue, 13 Oct 2026 17:38:47 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-345655-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 80DCB10FE50; Tue, 13 Oct 2026 17:38:37 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sea.lore.kernel.org (Postfix) with ESMTP id C2F89C4D89; Tue, 13 Oct 2026 13:59:48 +0000 (UTC) X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A2AFC4F393E; Tue, 13 Oct 2026 13:52:32 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="cJBGUOzz" X-Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 7DB454EB872 for <netdev@vger.kernel.org>; Tue, 13 Oct 2026 13:52:31 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791899552; cv=none; b=OC9xWXa5zZ6GAynhbE/t++nKIIjx7RskdeIPGavDSV0av+c6aEkBsuBz9IK170d+H8GcVFT31lqAyPT6boSBTm5UIue+OlP7RxsZNcqsSHukpzrApslHe7MeDpQM38GDBh3fQ1EBphllseI5iL+aQmYYSxPvgrUA0YEvwJ0xHak= X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791899552; c=relaxed/simple; bh=bM5ODnkTE4YRR8HbV8C5Z+Ku1Q9ttvkcICyvgA4chm4=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=gMSZp0JXtaXNeNAIDUOH8wDvuendDtutinI+7aMyheqx439UnU0W+iYT0ydkkkpgxuTzjgcl4yt8rdR77yQ+6xVpx6GRmGm/ug/ksHPS0i5o3A7MRdZvv9/jBuBS3umSoyuQBXl/H6sMCOkyWx+skEqj0u0am2q2QKvnZxofv1I= X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=cJBGUOzz; arc=none smtp.client-ip=100.103.45.18 X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 95E1D1F00893; Tue, 13 Oct 2026 13:52:30 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1791899551; bh=dC/LT/OLHmB+of2DVyrQgsx8eInGRvi9YzDMSDwDp38=; h=Date:Subject:To:Cc:References:From:In-Reply-To; b=cJBGUOzzoMYELyBGkl0B1LBmipS66qSr5f7CAi+TtfJhUfg1k+UtJCqvB0qn5MHdu VouA4jijAht+ZkfImwLm4fXkBpJr+/7Fo+6bhFJfnKPY/8fD7vT+o++q2dadSAYkDT RUA24uYeqLdRbrHMQD0vM/x4NFBCNhi7oPeeW4DT78t2wYuMfkuUmxI+zXkox4Rqp9 CPCldpm6XrSRfTWwd2cEGDBHGpspWd96BtvCxLfiEz6kVvhjG0mh8AfAo244QlD0+e EallY/M+5VfCn7tsNHdHChW5QOjYB/uuVkgG/YmS1pzqYgD257Nc6sHwnUu8nzmhY6 iuIfi/Fo7tCuA== X-Precedence: bulk X-Mailing-List: netdev@vger.kernel.org X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-User-Agent: Mozilla Thunderbird X-Cc: netdev@vger.kernel.org, Sabrina Dubroca <sd@queasysnail.net>, Andrew Lunn <andrew+netdev@lunn.ch>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>, Ido Schimmel <idosch@nvidia.com> X-In-Reply-To: <375bc468-fb28-4620-a5c8-0f7ba9e693d6@openvpn.net>