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 ECD8F1684BE; Tue, 16 Jun 2026 15:50:12 +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=1781625013; cv=none; b=Dt0JV5E1tKfwBGWn8C9mLVxsVdXllK6oZLDrWvg6YCG/4va7gHMzbo1DCL5NEZssfbMvSat8JI02WswdApoLUXsarxpWprqV24//sTAGzE3G4YtDRYZ6cr40SD3h8VtnC8ISklK4rYsu9zH6hgANpqo3/ySRRQ+AGq+1j7MvH6Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781625013; c=relaxed/simple; bh=6x2ZQVmYevZX4boYyqW7k+XzObMeQuoWESqMx/rW30o=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=MpxiKYaQd+QWTalIl9ucV58vJwklkMUmb5zgWE9phEtpe0xUzyQhvT9JVy4KGH4zlzqvBrH4t5IdisX5AawaapWbUDQVGBKoVZc7TJGWK/gU8aU3eFXwwRw8piyqYR9UQiZeM14efvwR2vcI8V3WSY1rG/JGI5PzYQktN2YevGs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ztU1yWDd; 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="ztU1yWDd" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AE01F1F000E9; Tue, 16 Jun 2026 15:50:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1781625012; bh=+nZZXQEMR6fzwumI/STC4hTNTqKZFuzXNyhP6MLN3nQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=ztU1yWDdr1JskYDA/OPYseEfqqBvTa7CEKG0FvWfqHpCnfPqL93y8D6EkUjs63Gd1 20BIVWir8vkwi0cfGYy8pG4MSwuxNfMmD55LptZDMgmklAfTzfaYIfF1sOtvOkul0S 2l3pCUsz9dF7xrC6faf0VPX+04DaibUdHgOVpZLc= 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.18 064/325] vxlan: vnifilter: fix spurious notification on VNI update Date: Tue, 16 Jun 2026 20:27:40 +0530 Message-ID: <20260616145100.891925078@linuxfoundation.org> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260616145057.827196531@linuxfoundation.org> References: <20260616145057.827196531@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.18-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 43c70c395b58e5..215e82876662de 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