* [nf-next:master 18/28] net/ipv4/netfilter/nf_defrag_ipv4.c:110:9: error: 'struct net' has no member named 'ct'
@ 2016-12-04 21:57 kbuild test robot
2016-12-04 22:37 ` [PATCH nf-next] netfilter: fix build failure with CONNTRACK=n NF_DEFRAG=y Florian Westphal
0 siblings, 1 reply; 3+ messages in thread
From: kbuild test robot @ 2016-12-04 21:57 UTC (permalink / raw)
To: Florian Westphal; +Cc: kbuild-all, netfilter-devel, coreteam, Pablo Neira Ayuso
[-- Attachment #1: Type: text/plain, Size: 1905 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git master
head: 7464293d4266a7b29565a4705d3fb2339350f9e2
commit: 018914b2c913bcc9c571ae5a781280c76a15ddad [18/28] netfilter: defrag: only register defrag functionality if needed
config: i386-randconfig-i1-201649 (attached as .config)
compiler: gcc-4.8 (Debian 4.8.4-1) 4.8.4
reproduce:
git checkout 018914b2c913bcc9c571ae5a781280c76a15ddad
# save the attached .config to linux build tree
make ARCH=i386
All errors (new ones prefixed by >>):
net/ipv4/netfilter/nf_defrag_ipv4.c: In function 'defrag4_net_exit':
>> net/ipv4/netfilter/nf_defrag_ipv4.c:110:9: error: 'struct net' has no member named 'ct'
if (net->ct.defrag_ipv4) {
^
net/ipv4/netfilter/nf_defrag_ipv4.c:113:6: error: 'struct net' has no member named 'ct'
net->ct.defrag_ipv4 = false;
^
net/ipv4/netfilter/nf_defrag_ipv4.c: In function 'nf_defrag_ipv4_enable':
net/ipv4/netfilter/nf_defrag_ipv4.c:137:9: error: 'struct net' has no member named 'ct'
if (net->ct.defrag_ipv4)
^
net/ipv4/netfilter/nf_defrag_ipv4.c:141:9: error: 'struct net' has no member named 'ct'
if (net->ct.defrag_ipv4)
^
net/ipv4/netfilter/nf_defrag_ipv4.c:147:6: error: 'struct net' has no member named 'ct'
net->ct.defrag_ipv4 = true;
^
vim +110 net/ipv4/netfilter/nf_defrag_ipv4.c
104 .priority = NF_IP_PRI_CONNTRACK_DEFRAG,
105 },
106 };
107
108 static void __net_exit defrag4_net_exit(struct net *net)
109 {
> 110 if (net->ct.defrag_ipv4) {
111 nf_unregister_net_hooks(net, ipv4_defrag_ops,
112 ARRAY_SIZE(ipv4_defrag_ops));
113 net->ct.defrag_ipv4 = false;
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 26835 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH nf-next] netfilter: fix build failure with CONNTRACK=n NF_DEFRAG=y
2016-12-04 21:57 [nf-next:master 18/28] net/ipv4/netfilter/nf_defrag_ipv4.c:110:9: error: 'struct net' has no member named 'ct' kbuild test robot
@ 2016-12-04 22:37 ` Florian Westphal
2016-12-06 10:16 ` Pablo Neira Ayuso
0 siblings, 1 reply; 3+ messages in thread
From: Florian Westphal @ 2016-12-04 22:37 UTC (permalink / raw)
To: netfilter-devel; +Cc: Florian Westphal
conntrack depends on defrag support, but not vice versa, so we cannot
place defrag_ipv4/6 into netns->ct:
net/ipv4/netfilter/nf_defrag_ipv4.c:110:9: error: 'struct net' has no member named 'ct'
Move it into net->nf.
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
---
Pablo, if you prefer to squash I have no objections.
include/net/netns/conntrack.h | 2 --
include/net/netns/netfilter.h | 6 ++++++
net/ipv4/netfilter/nf_defrag_ipv4.c | 10 +++++-----
net/ipv6/netfilter/nf_defrag_ipv6_hooks.c | 10 +++++-----
4 files changed, 16 insertions(+), 12 deletions(-)
diff --git a/include/net/netns/conntrack.h b/include/net/netns/conntrack.h
index 2a6af004e2f8..cf799fc3fdec 100644
--- a/include/net/netns/conntrack.h
+++ b/include/net/netns/conntrack.h
@@ -124,8 +124,6 @@ struct netns_ct {
int sysctl_acct;
int sysctl_auto_assign_helper;
bool auto_assign_helper_warned;
- bool defrag_ipv4;
- bool defrag_ipv6;
int sysctl_tstamp;
int sysctl_checksum;
diff --git a/include/net/netns/netfilter.h b/include/net/netns/netfilter.h
index 58487b1cc99a..cea396b53a60 100644
--- a/include/net/netns/netfilter.h
+++ b/include/net/netns/netfilter.h
@@ -17,5 +17,11 @@ struct netns_nf {
struct ctl_table_header *nf_log_dir_header;
#endif
struct nf_hook_entry __rcu *hooks[NFPROTO_NUMPROTO][NF_MAX_HOOKS];
+#if IS_ENABLED(CONFIG_NF_DEFRAG_IPV4)
+ bool defrag_ipv4;
+#endif
+#if IS_ENABLED(CONFIG_NF_DEFRAG_IPV6)
+ bool defrag_ipv6;
+#endif
};
#endif
diff --git a/net/ipv4/netfilter/nf_defrag_ipv4.c b/net/ipv4/netfilter/nf_defrag_ipv4.c
index 8f72e4f172be..49bd6a54404f 100644
--- a/net/ipv4/netfilter/nf_defrag_ipv4.c
+++ b/net/ipv4/netfilter/nf_defrag_ipv4.c
@@ -107,10 +107,10 @@ static struct nf_hook_ops ipv4_defrag_ops[] = {
static void __net_exit defrag4_net_exit(struct net *net)
{
- if (net->ct.defrag_ipv4) {
+ if (net->nf.defrag_ipv4) {
nf_unregister_net_hooks(net, ipv4_defrag_ops,
ARRAY_SIZE(ipv4_defrag_ops));
- net->ct.defrag_ipv4 = false;
+ net->nf.defrag_ipv4 = false;
}
}
@@ -134,17 +134,17 @@ int nf_defrag_ipv4_enable(struct net *net)
might_sleep();
- if (net->ct.defrag_ipv4)
+ if (net->nf.defrag_ipv4)
return 0;
mutex_lock(&defrag4_mutex);
- if (net->ct.defrag_ipv4)
+ if (net->nf.defrag_ipv4)
goto out_unlock;
err = nf_register_net_hooks(net, ipv4_defrag_ops,
ARRAY_SIZE(ipv4_defrag_ops));
if (err == 0)
- net->ct.defrag_ipv4 = true;
+ net->nf.defrag_ipv4 = true;
out_unlock:
mutex_unlock(&defrag4_mutex);
diff --git a/net/ipv6/netfilter/nf_defrag_ipv6_hooks.c b/net/ipv6/netfilter/nf_defrag_ipv6_hooks.c
index b6ad889b165b..8e0bdd058787 100644
--- a/net/ipv6/netfilter/nf_defrag_ipv6_hooks.c
+++ b/net/ipv6/netfilter/nf_defrag_ipv6_hooks.c
@@ -91,10 +91,10 @@ static struct nf_hook_ops ipv6_defrag_ops[] = {
static void __net_exit defrag6_net_exit(struct net *net)
{
- if (net->ct.defrag_ipv6) {
+ if (net->nf.defrag_ipv6) {
nf_unregister_net_hooks(net, ipv6_defrag_ops,
ARRAY_SIZE(ipv6_defrag_ops));
- net->ct.defrag_ipv6 = false;
+ net->nf.defrag_ipv6 = false;
}
}
@@ -136,17 +136,17 @@ int nf_defrag_ipv6_enable(struct net *net)
might_sleep();
- if (net->ct.defrag_ipv6)
+ if (net->nf.defrag_ipv6)
return 0;
mutex_lock(&defrag6_mutex);
- if (net->ct.defrag_ipv6)
+ if (net->nf.defrag_ipv6)
goto out_unlock;
err = nf_register_net_hooks(net, ipv6_defrag_ops,
ARRAY_SIZE(ipv6_defrag_ops));
if (err == 0)
- net->ct.defrag_ipv6 = true;
+ net->nf.defrag_ipv6 = true;
out_unlock:
mutex_unlock(&defrag6_mutex);
--
2.7.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH nf-next] netfilter: fix build failure with CONNTRACK=n NF_DEFRAG=y
2016-12-04 22:37 ` [PATCH nf-next] netfilter: fix build failure with CONNTRACK=n NF_DEFRAG=y Florian Westphal
@ 2016-12-06 10:16 ` Pablo Neira Ayuso
0 siblings, 0 replies; 3+ messages in thread
From: Pablo Neira Ayuso @ 2016-12-06 10:16 UTC (permalink / raw)
To: Florian Westphal; +Cc: netfilter-devel
On Sun, Dec 04, 2016 at 11:37:22PM +0100, Florian Westphal wrote:
> conntrack depends on defrag support, but not vice versa, so we cannot
> place defrag_ipv4/6 into netns->ct:
>
> net/ipv4/netfilter/nf_defrag_ipv4.c:110:9: error: 'struct net' has no member named 'ct'
>
> Move it into net->nf.
Applied, thanks Florian.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-12-06 10:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-04 21:57 [nf-next:master 18/28] net/ipv4/netfilter/nf_defrag_ipv4.c:110:9: error: 'struct net' has no member named 'ct' kbuild test robot
2016-12-04 22:37 ` [PATCH nf-next] netfilter: fix build failure with CONNTRACK=n NF_DEFRAG=y Florian Westphal
2016-12-06 10:16 ` Pablo Neira Ayuso
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).