From 516798ace3d25ad1697607de1780c1bfcbfa94e6 Mon Sep 17 00:00:00 2001 From: Etan Kissling Date: Wed, 13 Jan 2021 00:54:08 +0100 Subject: [PATCH] nf-conntrack: allow querying conntrack info in nfqueue This allows libnetfilter_queue to access connection tracking information by requesting NFQA_CFG_F_CONNTRACK. Connection tracking information is provided in the NFQA_CT attribute. CONFIG_NETFILTER_NETLINK_GLUE_CT enables the interaction between nf_queue and nf_conntrack_netlink. Without this option, trying to access connection tracking information results in "Operation not supported". Signed-off-by: Etan Kissling [Backport to kernel 4.9, 4.14 and 4.19] Signed-off-by: AmadeusGhost Signed-off-by: Tianling Shen --- package/kernel/linux/modules/netfilter.mk | 2 +- target/linux/generic/config-4.14 | 1 + target/linux/generic/config-4.19 | 1 + target/linux/generic/config-4.9 | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/package/kernel/linux/modules/netfilter.mk b/package/kernel/linux/modules/netfilter.mk index cd58b73275..31b5698f93 100644 --- a/package/kernel/linux/modules/netfilter.mk +++ b/package/kernel/linux/modules/netfilter.mk @@ -1067,7 +1067,7 @@ $(eval $(call KernelPackage,nfnetlink-queue)) define KernelPackage/nf-conntrack-netlink TITLE:=Connection tracking netlink interface FILES:=$(LINUX_DIR)/net/netfilter/nf_conntrack_netlink.ko - KCONFIG:=CONFIG_NF_CT_NETLINK CONFIG_NF_CONNTRACK_EVENTS=y + KCONFIG:=CONFIG_NF_CT_NETLINK CONFIG_NF_CONNTRACK_EVENTS=y CONFIG_NETFILTER_NETLINK_GLUE_CT=y AUTOLOAD:=$(call AutoProbe,nf_conntrack_netlink) $(call AddDepends/nfnetlink,+kmod-ipt-conntrack) endef diff --git a/target/linux/generic/config-4.14 b/target/linux/generic/config-4.14 index 4e4df6ec16..5a8e3781ea 100644 --- a/target/linux/generic/config-4.14 +++ b/target/linux/generic/config-4.14 @@ -3335,6 +3335,7 @@ CONFIG_NF_CONNTRACK_PROCFS=y # CONFIG_NF_CONNTRACK_TIMESTAMP is not set # CONFIG_NF_CONNTRACK_ZONES is not set # CONFIG_NF_CT_NETLINK is not set +# CONFIG_NF_CT_NETLINK_HELPER is not set # CONFIG_NF_CT_NETLINK_TIMEOUT is not set # CONFIG_NF_CT_PROTO_DCCP is not set # CONFIG_NF_CT_PROTO_GRE is not set diff --git a/target/linux/generic/config-4.19 b/target/linux/generic/config-4.19 index 658bcb09db..63813be3c9 100644 --- a/target/linux/generic/config-4.19 +++ b/target/linux/generic/config-4.19 @@ -3495,6 +3495,7 @@ CONFIG_NF_CONNTRACK_PROCFS=y # CONFIG_NF_CONNTRACK_TIMESTAMP is not set # CONFIG_NF_CONNTRACK_ZONES is not set # CONFIG_NF_CT_NETLINK is not set +# CONFIG_NF_CT_NETLINK_HELPER is not set # CONFIG_NF_CT_NETLINK_TIMEOUT is not set # CONFIG_NF_CT_PROTO_DCCP is not set # CONFIG_NF_CT_PROTO_GRE is not set diff --git a/target/linux/generic/config-4.9 b/target/linux/generic/config-4.9 index 8eae9b4e7b..5a5e982534 100644 --- a/target/linux/generic/config-4.9 +++ b/target/linux/generic/config-4.9 @@ -3026,6 +3026,7 @@ CONFIG_NF_CONNTRACK_PROCFS=y # CONFIG_NF_CONNTRACK_TIMESTAMP is not set # CONFIG_NF_CONNTRACK_ZONES is not set # CONFIG_NF_CT_NETLINK is not set +# CONFIG_NF_CT_NETLINK_HELPER is not set # CONFIG_NF_CT_NETLINK_TIMEOUT is not set # CONFIG_NF_CT_PROTO_DCCP is not set # CONFIG_NF_CT_PROTO_GRE is not set