Skip to contentSkip to conversation

netfilter: nfnetlink_hook: add depends-on nftables

PATCH Applied Florian Westphal 2 participants 2 messages Jun 8, 2021 – Jun 9, 2021

Subsystems (2)
lore
Share & tools
lore

Florian Westphal

author maintainer
#0 lore raw

PATCH v2 1/1 netfilter: nfnetlink_hook: add depends-on nftables

nfnetlink_hook.c: In function 'nfnl_hook_put_nft_chain_info':
nfnetlink_hook.c:76:7: error: implicit declaration of 'nft_is_active'

This macro is only defined when NF_TABLES is enabled. While its possible to also add an ifdef-guard, the infrastructure is currently not useful without nf_tables.

Fixes 252956528caa ("netfilter: add new hook nfnl subsystem")

---
v2: use depends-on to prohibit the problematic
config setting of HOOK=y NF_TABLES=n.

 net/netfilter/Kconfig | 1 +
 1 file changed, 1 insertion(+)
net/netfilter/Kconfig +1 -0
index c81321372198..54395266339d 100644
@@ -22,6 +22,7 @@ config NETFILTER_FAMILY_ARP
 config NETFILTER_NETLINK_HOOK
 	tristate "Netfilter base hook dump support"
 	depends on NETFILTER_ADVANCED
+	depends on NF_TABLES
 	select NETFILTER_NETLINK
 	help
 	  If this option is enabled, the kernel will include support
Signature · 1 line
2.31.1
maintainer Applied
#1 lore raw
Quoted 6 lines · Florian Westphal

nfnetlink_hook.c: In function 'nfnl_hook_put_nft_chain_info':
nfnetlink_hook.c:76:7: error: implicit declaration of 'nft_is_active'

This macro is only defined when NF_TABLES is enabled. While its possible to also add an ifdef-guard, the infrastructure is currently not useful without nf_tables.

Applied, thanks.