🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #4791

Re: [PATCH] netfilter: nf_conntrack_netlink: fix inverted IPv6 tuple filter

#4791
From: Florian Westphal
Date: Mon, 19 Oct 2026 08:42
15 lines
5580 bytes
liuc63 <liuc63@xiaopeng.com> wrote:
> From: Liu Chao <liuc63@xiaopeng.com>
> 
> ctnetlink_filter_match_tuple() returns 0 (no match) when the IPv6
> source or destination address differs from the filter, because the
> !ipv6_addr_cmp() test is inverted.  ipv6_addr_cmp() returns 0 when
> the addresses are equal, so the negation makes the branch trigger on
> a match instead of a mismatch, which is the opposite of the IPv4
> path above.
> 
> Drop the '!' so the IPv6 branch returns 0 only when the addresses
> differ, matching the IPv4 semantics and the caller's expectation.

Reviewed-by: Florian Westphal <fw@strlen.de>
Technical Details
Message-ID: <atXX4zhsKh_qRvgM@strlen.de>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-348352-linux-kernel-netdev=dewy.ru
References: <20261019075629.2091511-1-liuc63@xiaopeng.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-348352-linux-kernel-netdev=dewy.ru
From: fw@strlen.de (Florian Westphal)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH] netfilter: nf_conntrack_netlink: fix inverted IPv6 tuple
 filter
Date: Mon, 19 Oct 2026 10:42:11 +0200
Organization: Usenet Network
Message-ID: <atXX4zhsKh_qRvgM@strlen.de>
References: <20261019075629.2091511-1-liuc63@xiaopeng.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: usenet.network;
	logging-data="3547779"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:MlBZyVgrn4EsdTj+MxZ1B8keA/0= sha256:ktKXGGTiusdAgUMcTf+idoN4wEBavE0T1ML/fTvUzh8=
	sha1:hkMMr6HfOXjK/WaP8Tf2TjmOzjY= sha256:ZQ8Td25DEGSM6IoshFW8kiUgcukclJ/6NpPEj9w1JnM=
Content-Disposition: inline
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 99D6A110953; Mon, 19 Oct 2026 11:46:27 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -2.951
X-Spam-Status: No, score=-2.951 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, 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-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 HhIMGTc3bqVF;
	Mon, 19 Oct 2026 11:46:25 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-348352-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=strlen.de
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id B6BE9110949; Mon, 19 Oct 2026 11:46:21 +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 F330C3EA7D; Mon, 19 Oct 2026 08:42:18 +0000 (UTC)
X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id C19114968E0;
	Mon, 19 Oct 2026 08:42:16 +0000 (UTC)
X-Received: from Chamillionaire.breakpoint.cc (Chamillionaire.breakpoint.cc [91.216.245.30])
	(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 8CEB9490C0B;
	Mon, 19 Oct 2026 08:42:14 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.216.245.30
X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1792399336; cv=none; b=LGcdkBeIIwoXJX17rX3L0Vmhlugw35pDmCpPdv9tSYznmTzt+Si/eitKlDXbCrV9/ZLsab+mmG83bo5Foz9PoSt2/KKFvkc9lnImkkZJ3UAZAom1LI4iT7BjNsicRExUdlah/D3YdLCynP0A/l3drt1YEK7veGZ5RfrH7XZEmGY=
X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1792399336; c=relaxed/simple;
	bh=l72QEcfR7AVY2CxgGwa+lj9tdxTb3qzMrD7bqOXXGD4=;
	h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
	 Content-Type:Content-Disposition:In-Reply-To; b=dkfYKvJivnNoVOxzixiavIkOAo8cJGzDXgy68Phu45EW1RIl0ubGAdiQ71/VkDiPnTJ3JI26zemYHtEAfazV6udK6VSZOYY6fMGvH4fLccQJZjuYeM8DzKGgcl3LfypIbfkWCTH6XnWTW4PjBM8XX7zzxtvjD5jySBfOl9nnYWw=
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=strlen.de; spf=pass smtp.mailfrom=strlen.de; arc=none smtp.client-ip=91.216.245.30
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=strlen.de
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=strlen.de
X-Received: by Chamillionaire.breakpoint.cc (Postfix, from userid 1003)
	id E797960515; Mon, 19 Oct 2026 10:42:11 +0200 (CEST)
X-Cc: Pablo Neira Ayuso <pablo@netfilter.org>, Phil Sutter <phil@nwl.cc>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Simon Horman <horms@kernel.org>,
	Florent Fourcot <florent.fourcot@wifirst.fr>,
	Romain Bellan <romain.bellan@wifirst.fr>,
	Weibin Liu <liuwb@xiaopeng.com>, netfilter-devel@vger.kernel.org,
	coreteam@netfilter.org, netdev@vger.kernel.org,
	stable@vger.kernel.org
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-In-Reply-To: <20261019075629.2091511-1-liuc63@xiaopeng.com>