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 DF4FF3B995E; Sat, 30 May 2026 17:35:36 +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=1780162543; cv=none; b=IJOPdz/GYenCE1ALMISHetb3AULzs/t0SotCU1eRZLExAg9n9m/24LaVxlCudWX+ksgyUyhb85T/dPTp+1pFFArqJhwlrJcu3EPzzxKGn0Ia0yYot12yOOwv14fxyK6mCpRg2yJ9P1bDS4kUqeyhcMKk1Hi3hxAg4UOC6xItvXA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780162543; c=relaxed/simple; bh=mXfhjWX21BqcG/B8r1YGLFX/8ZVQrj1T/z29f+VsqFg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=fygkEKvWp06a6lAknpB7MO+1hccTTm8reADnZ4kYa4sbB/r6UQFf3cjcjL74HmmVN/qn3j92dy5N0SM8wB6WhiB02kpfEctMiEzgT5u1NiGoIbA2wzkAn0X239w3DnlILUEKkldU1HPzvX+Fy4CMRJdAmwtshXV8N4yTE9PsFtg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=vbXGQJSj; 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="vbXGQJSj" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 359B01F0089A; Sat, 30 May 2026 17:35:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1780162536; bh=CCTSBZForrnXm9F0NyPyB+HjaKvVBo7FQFBgdUZFQ6I=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=vbXGQJSjSHAJvNpV7rEZGd456M27ZFPHGtLdKus6mEjnkhTLueTm0uACEww+tZL4T lW8J3EPsonVfJVFnM6q7GyIfWIdesq/3NDc8uvWlVWF1tpX2G2YxQm36jMFMB8mFUe NLivhT2qScwUcfEBv/7xb1GY8hTYqB94gZkgS6x4= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Florian Westphal , Phil Sutter , Sasha Levin Subject: [PATCH 6.1 907/969] netfilter: arptables: allow xtables-nft only builds Date: Sat, 30 May 2026 18:07:11 +0200 Message-ID: <20260530160325.765904586@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260530160300.485627683@linuxfoundation.org> References: <20260530160300.485627683@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: Florian Westphal [ Upstream commit 4654467dc7e111e84f43ed1b70322873ae77e7be ] Allows to build kernel that supports the arptables mangle target via nftables' compat infra but without the arptables get/setsockopt interface or the old arptables filter interpreter. IOW, setting IP_NF_ARPFILTER=n will break arptables-legacy, but arptables-nft will continue to work as long as nftables compat support is enabled. Signed-off-by: Florian Westphal Reviewed-by: Phil Sutter Stable-dep-of: b4597d5fd7d2 ("netfilter: x_tables: add and use xtables_unregister_table_exit") Signed-off-by: Sasha Levin --- net/ipv4/netfilter/Kconfig | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/net/ipv4/netfilter/Kconfig b/net/ipv4/netfilter/Kconfig index aab384126f61f..483778f379d44 100644 --- a/net/ipv4/netfilter/Kconfig +++ b/net/ipv4/netfilter/Kconfig @@ -323,36 +323,34 @@ endif # IP_NF_IPTABLES # ARP tables config IP_NF_ARPTABLES - tristate "ARP tables support" - select NETFILTER_XTABLES - select NETFILTER_FAMILY_ARP - depends on NETFILTER_ADVANCED - help - arptables is a general, extensible packet identification framework. - The ARP packet filtering and mangling (manipulation)subsystems - use this: say Y or M here if you want to use either of those. - - To compile it as a module, choose M here. If unsure, say N. + tristate -if IP_NF_ARPTABLES +config NFT_COMPAT_ARP + tristate + depends on NF_TABLES_ARP && NFT_COMPAT + default m if NFT_COMPAT=m + default y if NFT_COMPAT=y config IP_NF_ARPFILTER - tristate "ARP packet filtering" + tristate "arptables-legacy packet filtering support" + select IP_NF_ARPTABLES help ARP packet filtering defines a table `filter', which has a series of rules for simple ARP packet filtering at local input and - local output. On a bridge, you can also specify filtering rules - for forwarded ARP packets. See the man page for arptables(8). + local output. This is only needed for arptables-legacy(8). + Neither arptables-nft nor nftables need this to work. To compile it as a module, choose M here. If unsure, say N. config IP_NF_ARP_MANGLE tristate "ARP payload mangling" + depends on IP_NF_ARPTABLES || NFT_COMPAT_ARP help Allows altering the ARP packet payload: source and destination hardware and network addresses. -endif # IP_NF_ARPTABLES + This option is needed by both arptables-legacy and arptables-nft. + It is not used by nftables. endmenu -- 2.53.0