From patchwork Wed Jan 10 17:10:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 124124 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp5526471qgn; Wed, 10 Jan 2018 09:12:15 -0800 (PST) X-Google-Smtp-Source: ACJfBot3KfMvC5PTLu9mV1TGobzSrLvWXJybeAi4+KgL10YxPn6UClTFz7H+ffy+uKhNuVdtu64E X-Received: by 10.84.150.129 with SMTP id h1mr19348222plh.369.1515604335275; Wed, 10 Jan 2018 09:12:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515604335; cv=none; d=google.com; s=arc-20160816; b=UewU1YnVQ3r55YZQWRNOZDNd9AzxTFejLzh1M+8WotwabPEfu7gMvcKnIlhb1sCZx3 L5BaStm+fqGsfKgzSWcOt33oAXZPpPJ9N5QFq33f5QxI/5QS4EMZUExMBnHAXz7Cr7wv Iw+3xkXE2ZhtBnQBOpa8v6odrJ6HeDYaavlTpfeZsOKMeTLr237DF6BxevvGwz0ilsrn 41AcTG42n3R5gIX4+M4PR8cMVOs/mG1fohAaTOGtbuDz2sh7IDB4aSk+T5KW/kKNSkW3 PFjL/NoUtFYkzQdu88rkqLZflVPe1raNu88EIan/RPMXACz07YfGPjv5Hjptk7QDhl+m nG7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=lcA9ocDqJJafOJN2vq9M2MPNva6Dqy7s6VMPyOxhi7A=; b=Bt4kR2C04SIfsgUkVqD6gDW/pdCIcIuhbBEDW+mNTF7HzpVcghe9GcArVyrLEFYizZ 7jTx1a55+9MMqfKb//oKwtIXZ/xQIoN0DoLMbRVQ0VVcSKGVXCT9oDbFF9G+B/K0510n XBKaGV7xlW9gTyBjEBev/zNFeC81GOzDyX5PmkwpPVX2ZrEVBTnIcMX6h9leupYQX0dm 9KPcjyo0CJruB9sf0G/s3yrasZ6A90qSmC8N8TBqqvdA4tJG/QKVwTliexQXgQNgaaVW zi7AHyqY9fs6a5bsc044sr/PSgbFrBPYfqZ2WP5lOZf+QVb3qoARjeGMUAXdyJzf1ijn bR0A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s72si4305178pgc.149.2018.01.10.09.12.15; Wed, 10 Jan 2018 09:12:15 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966092AbeAJRMM (ORCPT + 28 others); Wed, 10 Jan 2018 12:12:12 -0500 Received: from mout.kundenserver.de ([212.227.126.133]:63858 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965876AbeAJRML (ORCPT ); Wed, 10 Jan 2018 12:12:11 -0500 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue006 [212.227.15.129]) with ESMTPA (Nemesis) id 0Llck0-1f8ejW0GLg-00ZRIt; Wed, 10 Jan 2018 18:11:50 +0100 From: Arnd Bergmann To: Pablo Neira Ayuso , Jozsef Kadlecsik , Florian Westphal , "David S. Miller" , Alexey Kuznetsov , Hideaki YOSHIFUJI Cc: Arnd Bergmann , netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next] netfilter: improve flow table Kconfig dependencies Date: Wed, 10 Jan 2018 18:10:59 +0100 Message-Id: <20180110171143.2528510-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:vcwkNldacraU1gkJ9r4yypub+T8P3iSjpxiMwuiRNHOIcvxtBhk ZYfnpDDY8unXgfUcaXSwKITO2imhfQPjgCCCBSk1y5kcR9MqM81VEdA2EQpz5OHX2clPkWL u4Pud4xFdTDs0hNDZyTdQEVD3SzEqSsEpirZT12kjnrJELn8707uv6XAme1p+bK+6xRO8pa phX1uWWF8lk9vpbFUwaIg== X-UI-Out-Filterresults: notjunk:1; V01:K0:8GpR1Wo3AH4=:OcHexxpseyoLPyedaGpcOF n4gSiBWVNX3M9JCP486YXqvy7OwX+GAqHdJptNNQfGBv7w52OIhRvA1itIb4AnOVOukHRgek8 vCpoiQxBeL4lz3je7a54jhaOUsSzzaQIzjo2Urk6FczX8Vv9JNdvH+Qg9E+gS9zxZPRiTmiAW wSjdWir4YZf2WEdOrcDycdDV+6ES2dq9ndoD9L9GaRey9EJGuIGbddrX3GZiqNveUQAfjWWtJ 9Qjle7Ixygp8u24+lu/5pDLvC7t014X94C8G4inncpjEQDv31cTsb5dnxdOAEYy+6BR9URZ7i 9bx5RcORIpPsfC+IPj9gySJ5o+gpn1FzyGMsDcFwjGM4HvFgC2zjVjF2M0df1Tgv1nVmvxU8z 9UjSkAXAmEcblfUisfkFNRASL8XQS3v6r+WLIZOQBb4QRcWG63dV2WleGFFfDbCIUt1vrnnuX tEUCB4PgmYyTdGHdwfuSriV1/xdoiSLehPP5C1Gk5nffU94RYDq4iC3bzOsH3r776oT91NMKU mBboSBeYTYvHdHOgBw6kbL4Fu3wSUmrw0AOVLVr62DzpbBTvnWakg5wAragjn/5+v3F0rNR6e CpIvO9VDYh7B/lvz727E6e9M1XH9yY3luIJAqyqP/7JkuVTfTbnselDntlNMXvJeMLwKoTO6U sRK64RAoatFY0IZdoWjKWWzmyTBVPr403jdMkmLp2B72hU0PDjI/7gxYdnTTsZZTKLEzxbGrI Qh7SNWJ3LlWpcG2ZnMIDlpRFedhzhN7Q/fTlZw== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The newly added NF_FLOW_TABLE options cause some build failures in randconfig kernels: - when CONFIG_NF_CONNTRACK is disabled, or is a loadable module but NF_FLOW_TABLE is built-in: In file included from net/netfilter/nf_flow_table.c:8:0: include/net/netfilter/nf_conntrack.h:59:22: error: field 'ct_general' has incomplete type struct nf_conntrack ct_general; include/net/netfilter/nf_conntrack.h: In function 'nf_ct_get': include/net/netfilter/nf_conntrack.h:148:15: error: 'const struct sk_buff' has no member named '_nfct' include/net/netfilter/nf_conntrack.h: In function 'nf_ct_put': include/net/netfilter/nf_conntrack.h:157:2: error: implicit declaration of function 'nf_conntrack_put'; did you mean 'nf_ct_put'? [-Werror=implicit-function-declaration] net/netfilter/nf_flow_table.o: In function `nf_flow_offload_work_gc': (.text+0x1540): undefined reference to `nf_ct_delete' - when CONFIG_NF_TABLES is disabled: In file included from net/ipv6/netfilter/nf_flow_table_ipv6.c:13:0: include/net/netfilter/nf_tables.h: In function 'nft_gencursor_next': include/net/netfilter/nf_tables.h:1189:14: error: 'const struct net' has no member named 'nft'; did you mean 'nf'? - when CONFIG_NF_FLOW_TABLE_INET is enabled, but NF_FLOW_TABLE_IPV4 or NF_FLOW_TABLE_IPV6 are not, or are loadable modules net/netfilter/nf_flow_table_inet.o: In function `nf_flow_offload_inet_hook': nf_flow_table_inet.c:(.text+0x94): undefined reference to `nf_flow_offload_ipv6_hook' nf_flow_table_inet.c:(.text+0x40): undefined reference to `nf_flow_offload_ip_hook' - when CONFIG_NF_FLOW_TABLES is disabled, but the other options are enabled: net/netfilter/nf_flow_table_inet.o: In function `nf_flow_offload_inet_hook': nf_flow_table_inet.c:(.text+0x6c): undefined reference to `nf_flow_offload_ipv6_hook' net/netfilter/nf_flow_table_inet.o: In function `nf_flow_inet_module_exit': nf_flow_table_inet.c:(.exit.text+0x8): undefined reference to `nft_unregister_flowtable_type' net/netfilter/nf_flow_table_inet.o: In function `nf_flow_inet_module_init': nf_flow_table_inet.c:(.init.text+0x8): undefined reference to `nft_register_flowtable_type' net/ipv4/netfilter/nf_flow_table_ipv4.o: In function `nf_flow_ipv4_module_exit': nf_flow_table_ipv4.c:(.exit.text+0x8): undefined reference to `nft_unregister_flowtable_type' net/ipv4/netfilter/nf_flow_table_ipv4.o: In function `nf_flow_ipv4_module_init': nf_flow_table_ipv4.c:(.init.text+0x8): undefined reference to `nft_register_flowtable_type' This adds additional Kconfig dependencies to ensure that NF_CONNTRACK and NF_TABLES are always visible from NF_FLOW_TABLE, and that the internal dependencies between the four new modules are met. Fixes: 7c23b629a808 ("netfilter: flow table support for the mixed IPv4/IPv6 family") Fixes: 0995210753a2 ("netfilter: flow table support for IPv6") Fixes: 97add9f0d66d ("netfilter: flow table support for IPv4") Signed-off-by: Arnd Bergmann --- net/ipv4/netfilter/Kconfig | 3 ++- net/ipv6/netfilter/Kconfig | 3 ++- net/netfilter/Kconfig | 4 +++- 3 files changed, 7 insertions(+), 3 deletions(-) -- 2.9.0 diff --git a/net/ipv4/netfilter/Kconfig b/net/ipv4/netfilter/Kconfig index 7d5d444964aa..3ad46a90b0fc 100644 --- a/net/ipv4/netfilter/Kconfig +++ b/net/ipv4/netfilter/Kconfig @@ -79,8 +79,9 @@ config NF_TABLES_ARP endif # NF_TABLES config NF_FLOW_TABLE_IPV4 - select NF_FLOW_TABLE tristate "Netfilter flow table IPv4 module" + depends on NF_CONNTRACK && NF_TABLES + select NF_FLOW_TABLE help This option adds the flow table IPv4 support. diff --git a/net/ipv6/netfilter/Kconfig b/net/ipv6/netfilter/Kconfig index 806e95375ec8..3fb2818317b8 100644 --- a/net/ipv6/netfilter/Kconfig +++ b/net/ipv6/netfilter/Kconfig @@ -72,8 +72,9 @@ endif # NF_TABLES_IPV6 endif # NF_TABLES config NF_FLOW_TABLE_IPV6 - select NF_FLOW_TABLE tristate "Netfilter flow table IPv6 module" + depends on NF_CONNTRACK && NF_TABLES + select NF_FLOW_TABLE help This option adds the flow table IPv6 support. diff --git a/net/netfilter/Kconfig b/net/netfilter/Kconfig index 0ee0fcf3abbf..ea447826e127 100644 --- a/net/netfilter/Kconfig +++ b/net/netfilter/Kconfig @@ -665,8 +665,9 @@ endif # NF_TABLES_NETDEV endif # NF_TABLES config NF_FLOW_TABLE_INET - select NF_FLOW_TABLE tristate "Netfilter flow table mixed IPv4/IPv6 module" + depends on NF_FLOW_TABLE_IPV4 && NF_FLOW_TABLE_IPV6 + select NF_FLOW_TABLE help This option adds the flow table mixed IPv4/IPv6 support. @@ -674,6 +675,7 @@ config NF_FLOW_TABLE_INET config NF_FLOW_TABLE tristate "Netfilter flow table module" + depends on NF_CONNTRACK && NF_TABLES help This option adds the flow table core infrastructure.