From mboxrd@z Thu Jan 1 00:00:00 1970 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 21290331A44; Tue, 16 Jun 2026 17:37:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781631446; cv=none; b=DtoJAwFtASxbBFg3U5Ue7EdwQKDNgeEZ8rWV3Esypi6XvveW5eX2qTCrp8FqrobcVNptdulpcWrAzemhvXPTZZopODMXPyqdg/2SqhaRFY1qrrydAd6QyqO8fQ73av5kgy5sHvVB13hB481JlYdkFRsUHb9rwFWpxUAIhfkgTzM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781631446; c=relaxed/simple; bh=Um0+gyjwMjNWvRRRMl0/VVP269Vj9SmiunLCOmW93Jw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=q3RVsVWIrf8w/noC/7mrZZ+QLSz9XNECppnfI/YL5gVkgl2K45PgJsL9BKVp4I1EcepE2FqTIDo72CE76SMUxPaCOVnHHHfgDs/5tLVFf53vIY3g2m8W2DMEYbz2A3zVaM10k2HWFr7UAlVxLlzZsuWjNu+hcxIIO6L3Sm69ukU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=R3BIGsB1; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="R3BIGsB1" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 21B7B1F000E9; Tue, 16 Jun 2026 17:37:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1781631445; bh=7KVTL4HTsvvXlRHw9LfwJ9IvIOq1hCpoum0laslwomA=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=R3BIGsB1cyCAHC6GYyWWVGLKEt2781Ml0KSHeAoJjzxC43bhurHeWX5QCTHKwPRts +v7Ne8qvZck0v16SjLY2fzhqc1SitXKxbS/SSwWgx14SxHMRBbD5fQfyG95utM91OJ mXSO30Gguxn7u1ukzQNMpAqdAlRPIn3/QTt6Ow1g= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Andy Roulin , Petr Machata , Jakub Kicinski , Sasha Levin Subject: [PATCH 6.1 223/522] vxlan: vnifilter: fix spurious notification on VNI update Date: Tue, 16 Jun 2026 20:26:10 +0530 Message-ID: <20260616145136.448341113@linuxfoundation.org> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260616145125.307082728@linuxfoundation.org> References: <20260616145125.307082728@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Andy Roulin [ Upstream commit 84683b5b60c7274e2c8f7f413d39d78d3db5540f ] When a VNI is re-added with the same attributes (e.g. same group or no group), vxlan_vni_update() sends a spurious RTM_NEWTUNNEL notification even though nothing changed. The bug is that 'if (changed)' tests whether the pointer is non-NULL, not the bool value it points to. Since every caller passes a valid pointer, the condition is always true and the notification fires unconditionally. Fix by dereferencing the pointer: 'if (*changed)'. Reproducer: # ip link add vxlan100 type vxlan dstport 4789 local 10.0.0.1 \ nolearning external vnifilter # ip link set vxlan100 up # bridge monitor vni & # bridge vni add vni 1000 dev vxlan100 # bridge vni add vni 1000 dev vxlan100 # spurious notification Fixes: f9c4bb0b245c ("vxlan: vni filtering support on collect metadata device") Signed-off-by: Andy Roulin Reviewed-by: Petr Machata Link: https://patch.msgid.link/20260602185138.253265-3-aroulin@nvidia.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/vxlan/vxlan_vnifilter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/vxlan/vxlan_vnifilter.c b/drivers/net/vxlan/vxlan_vnifilter.c index ca866740a955d0..abf96d60eb30d5 100644 --- a/drivers/net/vxlan/vxlan_vnifilter.c +++ b/drivers/net/vxlan/vxlan_vnifilter.c @@ -671,7 +671,7 @@ static int vxlan_vni_update(struct vxlan_dev *vxlan, if (ret) return ret; - if (changed) + if (*changed) vxlan_vnifilter_notify(vxlan, vninode, RTM_NEWTUNNEL); return 0; -- 2.53.0