net/netfilter/nf_log.c:373:38: error: 'struct netns_nf' has no member named 'proc_netfilter'
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): 517f72cc.fRNNPd+CdJx0ePvu%[email protected]
A message that is not in the archive (sent off-list or not yet received): 20130430140552.GA8837@localhost
A message that is not in the archive (sent off-list or not yet received): 20130430175951.GA28292@localhost
Pablo Neira Ayuso
maintainerQuoted 18 lines · Fengguang Wu
FYI, kernel build failed on
tree: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next master head: d7c35d45ce991ae01b6008abef120173fc9c3814 commit: dba554cc481ab6582202dd954f927e7657ee453a Merge remote-tracking branch 'net-next/master' date: 5 hours ago config: i386-randconfig-r05-0429 (attached as .config)All error/warnings:
In file included from
net/netfilter/nf_log.c:4:0:
include/linux/proc_fs.h:58:20: error: redefinition of 'proc_set_size'
include/linux/proc_fs.h:51:20: note: previous definition of 'proc_set_size' was hereinclude/linux/proc_fs.h: In function 'proc_net_mkdir':
include/linux/proc_fs.h:69:2: error: implicit declaration of function 'proc_mkdir_data' [-Werror=implicit-function-declaration]include/linux/proc_fs.h:69:2: warning: return makes pointer from integer without a cast [enabled by default]net/netfilter/nf_log.c: In function 'nf_log_net_init':
Quoted 4 lines
Quoted 1 line
Quoted 1 line
net/netfilter/nf_log.c:373:38: error: 'structnetns_nf' has no member named 'proc_netfilter'
net/netfilter/nf_log.c: In function 'nf_log_net_exit':Quoted 1 line
Quoted 1 line
net/netfilter/nf_log.c:381:37: error: 'structnetns_nf' has no member named 'proc_netfilter'cc1: some warnings being treated as errors
I have attached a patch to resolve the issue. Thanks.
Quoted 1 line
From
4c5f54174742db8227ef117c78710a45b25368ceMon Sep 17 00:00:00 2001
From: Pablo Neira Ayuso <[email protected]>
Date: Tue, 30 Apr 2013 19:50:54 +0200
Subject: [PATCH] netfilter: nf_{log,queue}: fix compilation without CONFIG_PROC_FS
This patch fixes the following compilation error:
net/netfilter/nf_log.c:373:38: error: 'struct netns_nf' has no member named 'proc_netfilter'
if procfs is not set.
The netns support for nf_log, nfnetlink_log and nfnetlink_queue_core requires CONFIG_PROC_FS in the removal path of their respective /proc interface since net->nf.proc_netfilter is undefined in that case.
--- net/netfilter/nf_log.c | 5 ++++- net/netfilter/nfnetlink_log.c | 2 ++ net/netfilter/nfnetlink_queue_core.c | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-)
net/netfilter/nf_log.c +4 -1
@@ -368,17 +368,20 @@ static int __net_init nf_log_net_init(struct net *net)return 0 ; out_sysctl: +#ifdef CONFIG_PROC_FS /* For init_net: errors will trigger panic, don't unroll on error. */ if (!net_eq (net, &init_net))remove_proc_entry ("nf_log" , net->nf.proc_netfilter); - +#endif return ret; } static void __net_exit nf_log_net_exit(struct net *net) {netfilter_log_sysctl_exit (net); +#ifdef CONFIG_PROC_FS remove_proc_entry ("nf_log" , net->nf.proc_netfilter); +#endif }static struct pernet_operations nf_log_net_ops = {
net/netfilter/nfnetlink_log.c +2 -0
@@ -1045,7 +1045,9 @@ static int __net_init nfnl_log_net_init(struct net *net) static void __net_exit nfnl_log_net_exit(struct net *net) { +#ifdef CONFIG_PROC_FS remove_proc_entry ("nfnetlink_log" , net->nf.proc_netfilter); +#endif }static struct pernet_operations nfnl_log_net_ops = {
net/netfilter/nfnetlink_queue_core.c +2 -0
@@ -1285,7 +1285,9 @@ static int __net_init nfnl_queue_net_init(struct net *net) static void __net_exit nfnl_queue_net_exit(struct net *net) { +#ifdef CONFIG_PROC_FS remove_proc_entry ("nfnetlink_queue" , net->nf.proc_netfilter); +#endif }static struct pernet_operations nfnl_queue_net_ops = {
Signature · 1 line
1.7.10.4
Gao feng
Acked-byQuoted 40 lines · Pablo Neira Ayuso
Quoted 18 lines · Fengguang Wu
Quoted 18 lines
FYI, kernel build failed on
tree: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next master head: d7c35d45ce991ae01b6008abef120173fc9c3814 commit: dba554cc481ab6582202dd954f927e7657ee453a Merge remote-tracking branch 'net-next/master' date: 5 hours ago config: i386-randconfig-r05-0429 (attached as .config)All error/warnings:
In file included from
net/netfilter/nf_log.c:4:0:
include/linux/proc_fs.h:58:20: error: redefinition of 'proc_set_size'
include/linux/proc_fs.h:51:20: note: previous definition of 'proc_set_size' was hereinclude/linux/proc_fs.h: In function 'proc_net_mkdir':
include/linux/proc_fs.h:69:2: error: implicit declaration of function 'proc_mkdir_data' [-Werror=implicit-function-declaration]include/linux/proc_fs.h:69:2: warning: return makes pointer from integer without a cast [enabled by default]net/netfilter/nf_log.c: In function 'nf_log_net_init':Quoted 4 lines
Quoted 4 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
net/netfilter/nf_log.c:373:38: error: 'structnetns_nf' has no member named 'proc_netfilter'
net/netfilter/nf_log.c: In function 'nf_log_net_exit':Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
net/netfilter/nf_log.c:381:37: error: 'structnetns_nf' has no member named 'proc_netfilter'cc1: some warnings being treated as errors
I have attached a patch to resolve the issue. Thanks.
0001-netfilter-fix-compilation-without-CONFIG_PROC_FS.patch
Quoted 1 line
From
4c5f54174742db8227ef117c78710a45b25368ceMon Sep 17 00:00:00 2001From: Pablo Neira Ayuso <[email protected]>
Date: Tue, 30 Apr 2013 19:50:54 +0200
Subject: [PATCH] netfilter: nf_{log,queue}: fix compilation withoutCONFIG_PROC_FSThis patch fixes the following compilation error:
net/netfilter/nf_log.c:373:38: error: 'structnetns_nf' has no member named 'proc_netfilter'if procfs is not set.
Quoted 8 lines
The netns support for
nf_log,nfnetlink_logandnfnetlink_queue_corerequiresCONFIG_PROC_FSin the removal path of their respective /proc interface sincenet->nf.proc_netfilteris undefined in that case.Reported-by Fengguang Wu <[email protected]>Signed-off-by Pablo Neira Ayuso <[email protected]>---
Looks good to me, thanks for your report and fix.