[openwrt/openwrt] kernel: Extract kmod-nf-dup-inet

LEDE Commits lede-commits at lists.infradead.org
Mon Jul 8 12:17:19 PDT 2024


hauke pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/1f701c9b0415df7fcf0aafb1f5ee3f70a8b9e00d

commit 1f701c9b0415df7fcf0aafb1f5ee3f70a8b9e00d
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Sat Jun 29 17:24:09 2024 +0200

    kernel: Extract kmod-nf-dup-inet
    
    The nf_dup_ipv4.ko and nf_dup_ipv6.ko kernel module were packaged by
    kmod-ipt-tee and kmod-nft-dup-inet at the same time. Extract them into a
    separate package used by both.
    
    Link: https://github.com/openwrt/openwrt/pull/15833
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
    (cherry picked from commit b0953c4fbf1bb0ad0844febe991636d05884c194)
    Link: https://github.com/openwrt/openwrt/pull/15898
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 include/netfilter.mk                      |  2 --
 package/kernel/linux/modules/netfilter.mk | 26 +++++++++++++++++++-------
 2 files changed, 19 insertions(+), 9 deletions(-)

diff --git a/include/netfilter.mk b/include/netfilter.mk
index 81488fe5c8..7d1f03891b 100644
--- a/include/netfilter.mk
+++ b/include/netfilter.mk
@@ -253,8 +253,6 @@ $(eval $(call nf_add,IPT_LED,CONFIG_NETFILTER_XT_TARGET_LED, $(P_XT)xt_LED))
 # tee
 
 $(eval $(call nf_add,IPT_TEE,CONFIG_NETFILTER_XT_TARGET_TEE, $(P_XT)xt_TEE))
-$(eval $(if $(NF_KMOD),$(call nf_add,IPT_TEE,CONFIG_NF_DUP_IPV4, $(P_V4)nf_dup_ipv4),))
-$(eval $(if $(NF_KMOD),$(call nf_add,IPT_TEE,CONFIG_NF_DUP_IPV6, $(P_V6)nf_dup_ipv6),))
 
 # u32
 
diff --git a/package/kernel/linux/modules/netfilter.mk b/package/kernel/linux/modules/netfilter.mk
index 0d2f8a9140..e47f926a67 100644
--- a/package/kernel/linux/modules/netfilter.mk
+++ b/package/kernel/linux/modules/netfilter.mk
@@ -132,6 +132,22 @@ endef
 $(eval $(call KernelPackage,nf-conntrack6))
 
 
+define KernelPackage/nf-dup-inet
+  SUBMENU:=$(NF_MENU)
+  TITLE:=Netfilter nf_tables dup in ip/ip6/inet family support
+  HIDDEN:=1
+  DEPENDS:=+kmod-nf-conntrack +IPV6:kmod-nf-conntrack6
+  KCONFIG:= \
+	CONFIG_NF_DUP_IPV4 \
+	CONFIG_NF_DUP_IPV6
+  FILES:= \
+	$(LINUX_DIR)/net/ipv4/netfilter/nf_dup_ipv4.ko \
+	$(LINUX_DIR)/net/ipv6/netfilter/nf_dup_ipv6.ko
+endef
+
+$(eval $(call KernelPackage,nf-dup-inet))
+
+
 define KernelPackage/nf-log
   SUBMENU:=$(NF_MENU)
   TITLE:=Netfilter Logging
@@ -716,7 +732,7 @@ $(eval $(call KernelPackage,ipt-tproxy))
 
 define KernelPackage/ipt-tee
   TITLE:=TEE support
-  DEPENDS:=+kmod-ipt-conntrack
+  DEPENDS:=+kmod-ipt-conntrack +kmod-nf-dup-inet
   KCONFIG:=$(KCONFIG_IPT_TEE)
   FILES:=$(foreach mod,$(IPT_TEE-m),$(LINUX_DIR)/net/$(mod).ko)
   AUTOLOAD:=$(call AutoProbe,$(notdir nf_tee $(IPT_TEE-m)))
@@ -1150,18 +1166,14 @@ $(eval $(call KernelPackage,nft-bridge))
 define KernelPackage/nft-dup-inet
   SUBMENU:=$(NF_MENU)
   TITLE:=Netfilter nf_tables dup in ip/ip6/inet family support
-  DEPENDS:=+kmod-nft-core +kmod-nf-conntrack +IPV6:kmod-nf-conntrack6
+  DEPENDS:=+kmod-nft-core +kmod-nf-dup-inet
   KCONFIG:= \
-	CONFIG_NF_DUP_IPV4 \
-	CONFIG_NF_DUP_IPV6 \
 	CONFIG_NFT_DUP_IPV4 \
 	CONFIG_NFT_DUP_IPV6
   FILES:= \
-	$(LINUX_DIR)/net/ipv4/netfilter/nf_dup_ipv4.ko \
-	$(LINUX_DIR)/net/ipv6/netfilter/nf_dup_ipv6.ko \
 	$(LINUX_DIR)/net/ipv4/netfilter/nft_dup_ipv4.ko \
 	$(LINUX_DIR)/net/ipv6/netfilter/nft_dup_ipv6.ko
-  AUTOLOAD:=$(call AutoProbe,nf_dup_ipv4 nf_dup_ipv6 nft_dup_ipv4 nft_dup_ipv6)
+  AUTOLOAD:=$(call AutoProbe,nft_dup_ipv4 nft_dup_ipv6)
 endef
 
 $(eval $(call KernelPackage,nft-dup-inet))




More information about the lede-commits mailing list