🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #16525

Re: [PATCH net v2] vxlan: reset the remote's dst cache when snooping moves a MAC

#16525
From: Zhefu Peng
Date: Sun, 15 Nov 2026 04:06
22 lines
11694 bytes
> [Severity: Medium]
> Can a concurrent transmit still put the old remote's route back into the
> cache after this reset?

Yes, the window exists: a transmit that read the old remote_ip before
the reset and reaches dst_cache_get() in a later jiffy refills the
cache with the old route. vxlan_fdb_replace() and the other tunnel
users that reset the cache after changing parameters have the same
window. Closing it needs a change to how dst_cache tracks freshness,
which is out of scope for this fix. Without the patch every move uses
the stale route; with it only this race does.

> [Severity: Medium]
> Does this overwrite a user-configured egress interface with 0?

Yes, this is a regression, and v4 has the same code. v5 compares
remote_ifindex in the early return only for link-local sources, so
traffic from the remote of an entry with a "via" device takes the early
return and the device stays set. The selftest gets a case for it.

pw-bot: cr
Technical Details
Message-ID: <20261115040600.61033-1-ilskdw@gmail.com>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-363552-linux-kernel-netdev=dewy.ru
References: <20261110153020.9635-1-ilskdw@gmail.com> <179470552404.2199510.13614872178874456081@kernel.org>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-363552-linux-kernel-netdev=dewy.ru
From: ilskdw@gmail.com (Zhefu Peng)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net v2] vxlan: reset the remote's dst cache when snooping moves a MAC
Date: Sun, 15 Nov 2026 12:06:00 +0800
Organization: Usenet Network
Message-ID: <20261115040600.61033-1-ilskdw@gmail.com>
References: <20261110153020.9635-1-ilskdw@gmail.com> <179470552404.2199510.13614872178874456081@kernel.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="1725561"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:PSlwotjgpjbh0Ub4AIPDf4r2LA4= sha256:rlLywQfwK+SF+ctaeQBFajrw1groS3OHjEgp/WLzzwY=
	sha1:leoxXNNQksYOXEARMTEJr1QSSUk= sha256:fapqOI3woddyFGGJUB+ZugQHP1uYQW/2pN822FsmdMk=
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 E1021125D3B; Sun, 15 Nov 2026 07:06:37 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.049
X-Spam-Status: No, score=-3.049 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001,
	FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249,
	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=gmail.com
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 GXlwVrZUJdF2;
	Sun, 15 Nov 2026 07:06:35 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-363552-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=gmail.com
X-Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4])
	by mail.dewy.ru (Postfix) with ESMTPS id 6FE66125D3C; Sun, 15 Nov 2026 07:06:24 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sin.lore.kernel.org (Postfix) with ESMTP id C685B2E715; Sun, 15 Nov 2026 04:06:11 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1794715568;
	b=fuOza/vWDnTv21xUKnogh9D5hwjIG3MH4QwuuqVznndQ5UYdisZP0b5hxjeYFG51N/Xo
	 PqNMyYNsUn3uig4/DxVxvYnrtct2PyntbV/rjuhms/zizNG+hcnYumV5QSGU6fyL8hWiN
	 hSfUtTjWnetmi1F3s7nfbXPvTwbbarjW3EQ5n4DyTIJ7GFb4Ed1uGnyYztfwmU1uMky3G
	 Hreu1SDk0SOLk7GgKIDyZrM/UpwhRGs1w8vpHDteEcEtNdC/lfHEkk9P8CP6SEvSzI5Py
	 Yd32t+3h2A8XPLdMcEXbtyS878Mk0spee+iivKyZP1O86eJhxRzUlC79RD9YdsnN5FA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794715568;
	h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
	 X-Google-DKIM-Signature:X-Gm-Message-State:X-Gm-Gg:X-Received:
	 Received:From:To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:
	 References:X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
	 List-Unsubscribe:List-Owner:Precedence:MIME-Version:
	 Content-Transfer-Encoding;
	bh=iwmdptKo6dk64XoNoPnTXdtm3q1gVmyweOC43Z9ckXs=;
	b=YzwEEiURGV8k8ae1JhYEvE161nVwaQKB9mEvncFa4mN/wlBtgJcewE2ikg/Uu3qvj+n0
	 /K56XkYCYubnNuJikfbz0Xfey6VYRwVdC2z3FBgTdn50hqrOtXWRpfqt+5BcK24ZVeOfC
	 SvNmkkLA/rIgoQVZU5USeY/xlFhGEdITSjkzx4nD/um7GaBLZ5r4G3wgCFePxi3jTfEBQ
	 aUafn32xu3C7MVg/e7Bp8weTRocLcI5a73sKQ9yKOYX07R2DLh1igBLw0qVAU38OtkDhF
	 ty0/wNbc9j608j4dZo2H6pzwi7h7PMyhJJVr6w1/sNH3VRODRih/8SN0JSaEKu1DK8A==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=x+bSaFel;
	dmarc=pass header.from=gmail.com;
	spf=pass smtp.mailfrom=gmail.com;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id DBAFF606A339;
	Sun, 15 Nov 2026 04:06:08 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=x+bSaFel
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.216.50
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1794715568;
	b=5Gd5s1o+nIrucZdKkFO2YtiCM4As8kczPovRWYMqB1e5ARU0QytzlI9NHbmEA6tU/DEk
	 QkBE1tNJOLcY1fVg3LpoUURQQ+aByVUCz135LmaEFO9TZq3pAWqrF42EKqSen68RbKvsp
	 resaYVxMWUT9U5wlNlsV79AsSJnriutEUTc9VNjm1mpok/ksvuPEkQ6UPdj53TIszSgNc
	 f1RzC6ftXU3SooQQt0e8JxgX0SFUdFlxR7AeFkXcKoJUeOrIWCevR6EPFxEm3x1fSkZ8r
	 o7+0kxdogo1Bo1OFl02aE4SDPv1vTEamDocX8g6/rGAzhNHCYmNfNXKueNhuhgxhmlg==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794715568;
	h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
	 X-Gm-Message-State:X-Gm-Gg:X-Received:Received:From:To:Cc:Subject:
	 Date:Message-ID:X-Mailer:In-Reply-To:References:MIME-Version:
	 Content-Transfer-Encoding;
	bh=iwmdptKo6dk64XoNoPnTXdtm3q1gVmyweOC43Z9ckXs=;
	b=g6FNLsqLKZtJFtkNlcKHxnksN4mNNTg0JzYpGV9HjIsP/UWV/BAsBWc0gJ9LM3EgU2b0
	 sx1Sw3f8DAmU7joiZQignmF5ZI3k0bSiG2cHnKRkr+A7g8AhVip94vtwLWAyjeWFPG5Zk
	 ISPAZfmrldVz4jzfKEx0Ojy8JPCCaICNum818LtmjHDN5BSPQjho6HUmVh++zKquLfumY
	 W0Q46t3cuBxmuzZtpVlna3Y1oyLC4Q2WDd6YYcNvjrLUJ7I5HnbsT7ychyev7QnVexmE2
	 ooB/KumLTq/FPVkKB9jdKmYTV58/sJj8AN/VNyKDvFmaXelV/nF3XdTdALbH4af7hOw==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=gmail.com;
	spf=pass smtp.mailfrom=gmail.com;
	dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=x+bSaFel;
	arc=none smtp.remote-ip=209.85.216.50
X-Received: from mail-pj1-f50.google.com (mail-pj1-f50.google.com [209.85.216.50])
	(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id B400F606A329
	for <netdev@vger.kernel.org>; Sun, 15 Nov 2026 04:06:07 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org B400F606A329
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
X-Received: by mail-pj1-f50.google.com with SMTP id 98e67ed59e1d1-3b0b3438540so2096420a91.0
        for <netdev@vger.kernel.org>; Sat, 14 Nov 2026 20:06:07 -0800 (PST)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20260707; t=1794715567; x=1795320367; darn=vger.kernel.org;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:from:to:cc:subject:date
         :message-id:reply-to:content-type;
        bh=iwmdptKo6dk64XoNoPnTXdtm3q1gVmyweOC43Z9ckXs=;
        b=x+bSaFeldrC3Bz9/GVySpHrjW8YGbrbHij5PaacyHQUQenVhari0VBOnPPKTd7RzT6
         aitq4PXbQGlODQrx6ZGInKjHjgAcQU7zSavKbaANTqrbvREmKDeGHAaIKnPViV/Oduta
         qTJDpKR0O9ipz541Y7VYHBnJIFjU4vlnYzBBV/M8kYFCLctgmd+SzpWU/2Y1kD7cOI8V
         c3aYTnZn0AcvckqU+WczoCWYVaFUjqrPs62yaVkos5rxFjbyhM06stv7Xgqm0eJA6OmO
         6C1fQ67eDPEsGkGf+KVtH2iZABo16il/FMxqkD+UWiySFlcf2CL3gJpCmLl6OuekXhe8
         KwhA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20260707; t=1794715567; x=1795320367;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from
         :to:cc:subject:date:message-id:reply-to:content-type;
        bh=iwmdptKo6dk64XoNoPnTXdtm3q1gVmyweOC43Z9ckXs=;
        b=zOKW5u8RD9SocE2TYMlow+sRVSHiLIm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G038K3
	hzBRvlJWFBowjrIQC/CF5p1CjjB7plmJXGm71ZWWx6TqS3BTafaR7Qetrbw5QQQaVsr53lUzVwn
	16y4NFhjmKtKeyV2OH6Cco+LI
X-Received: by 2002:a17:90b:5647:b0:3ac:b2e6:3181 with SMTP id 98e67ed59e1d1-3b1b0a0eafbmr6641258a91.37.1794715566761;
        Sat, 14 Nov 2026 20:06:06 -0800 (PST)
X-Received: from localhost.localdomain ([116.88.205.165])
        by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3b197c6c9c5sm15925719a91.1.2026.11.14.20.06.03
        (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256);
        Sat, 14 Nov 2026 20:06:06 -0800 (PST)
X-Cc: netdev@vger.kernel.org,
	andrew+netdev@lunn.ch,
	davem@davemloft.net,
	edumazet@kernel.org,
	kuba@kernel.org,
	pabeni@redhat.com,
	kuniyu@google.com,
	mschiffer@universe-factory.net
X-Mailer: git-send-email 2.54.0
X-In-Reply-To: <179470552404.2199510.13614872178874456081@kernel.org>
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list