netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] netfilter: Make NETFILTER_NETLINK_HOOK depends on NF_TABLES
@ 2021-06-09  9:57 He Ying
  0 siblings, 0 replies; only message in thread
From: He Ying @ 2021-06-09  9:57 UTC (permalink / raw)
  To: pablo, kadlec, fw, davem, kuba
  Cc: netfilter-devel, coreteam, netdev, linux-kernel, heying24

Compiling errors happen when CONFIG_NETFILTER_NETLINK_HOOK = y
while CONFIG_NF_TABLES is not set:

net/netfilter/nfnetlink_hook.c: In function ‘nfnl_hook_put_nft_chain_info’:
net/netfilter/nfnetlink_hook.c:76:7: error: implicit declaration of function
‘nft_is_active’ [-Werror=implicit-function-declaration]
   76 |  if (!nft_is_active(net, chain))
      |       ^~~~~~~~~~~~~

Notice that nft_is_active macro is only defined when CONFIG_NF_TABLES
is enabled, so add dependency on NF_TABLES in NETFILTER_NETLINK_HOOK
configurations.

Fixes: e2cf17d3774c ("netfilter: add new hook nfnl subsystem")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: He Ying <heying24@huawei.com>
---
 net/netfilter/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/netfilter/Kconfig b/net/netfilter/Kconfig
index c81321372198..54395266339d 100644
--- a/net/netfilter/Kconfig
+++ b/net/netfilter/Kconfig
@@ -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
-- 
2.17.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-06-09  9:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-09  9:57 [PATCH -next] netfilter: Make NETFILTER_NETLINK_HOOK depends on NF_TABLES He Ying

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).