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 E788B43DA2C; Tue, 16 Jun 2026 15:16:33 +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=1781622994; cv=none; b=SYT37weifH0x7MP+9mEOgjA9DilhL5OMik+C8vbyBIxFGXnaNbMxtCu/7Z81OlkKaYkq1rEBIhGEM5FRJtYB+M2EBobueAtLuMoUdPBCjvkTHH4XIwjDjZrPxgYw9zrQvyfEaq8Rjknhu3nlT5WA7OB2dBmYa4e265yNAX54cXg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781622994; c=relaxed/simple; bh=X6FLsO6nvcrHtgjnv344wTkX4gIMco/ClscZXQ94v7I=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Va4BtazQc6ayQCEi/c6zm6FoEtTwBkzvjdwRs9e1qasl7ltGJG9IR8mGGFuu6HGhGK3nnhck7DyT/aQOQd2Ono+f4Qc6/19xro3c28B/PSgUCNWQg9dJSeQ5k0QewJqjxHdegxmM2COuwn3+lTdE73qFUFEKXewy3HN5OWCpPVg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=GdxH3PoR; 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="GdxH3PoR" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EA9191F000E9; Tue, 16 Jun 2026 15:16:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1781622993; bh=37ITZ/8Qq5+iHhpLviCFbRf5L4PnVoza6wbhejNY75A=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=GdxH3PoRtAvL7U9ZxNEy/H2nWEV7bb2yCPRojuG6+EUKY2bKs4kCT3TvXZcz/w0ez X0H78kRGXMOGczM3mg/EcgA5dyh/0r9V0B9L4ifNFs3dI8Fk10gRp55FyiBy9l2AKc w5qYmvC899Hl7CvBprwnhP+kTdWgLG7264zW+SUo= 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 7.0 067/378] vxlan: vnifilter: fix spurious notification on VNI update Date: Tue, 16 Jun 2026 20:24:58 +0530 Message-ID: <20260616145113.586514892@linuxfoundation.org> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260616145109.744539446@linuxfoundation.org> References: <20260616145109.744539446@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 7.0-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 f2a202d468928c..3e76f4e210944f 100644 --- a/drivers/net/vxlan/vxlan_vnifilter.c +++ b/drivers/net/vxlan/vxlan_vnifilter.c @@ -661,7 +661,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