]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
netfilter: use forward declaration instead of including linux/proc_fs.h
authorPablo Neira Ayuso <pablo@netfilter.org>
Wed, 17 Jun 2015 15:28:26 +0000 (10:28 -0500)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 18 Jun 2015 19:14:30 +0000 (21:14 +0200)
We don't need to pull the full definitions in that file, a simple forward
declaration is enough.

Moreover, include linux/procfs.h from nf_synproxy_core, otherwise this hits a
compilation error due to missing declarations, ie.

net/netfilter/nf_synproxy_core.c: In function ‘synproxy_proc_init’:
net/netfilter/nf_synproxy_core.c:326:2: error: implicit declaration of function ‘proc_create’ [-Werror=implicit-function-declaration]
  if (!proc_create("synproxy", S_IRUGO, net->proc_net_stat,
  ^

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
include/net/netns/netfilter.h
net/netfilter/nf_synproxy_core.c

index 88740024ccf37e9553c61884afd39c27dcec8fa7..cf25b5e35f3c9d3d583a1a4028a527e0cbdf0f6f 100644 (file)
@@ -1,9 +1,9 @@
 #ifndef __NETNS_NETFILTER_H
 #define __NETNS_NETFILTER_H
 
-#include <linux/proc_fs.h>
 #include <linux/netfilter.h>
 
+struct proc_dir_entry;
 struct nf_logger;
 
 struct netns_nf {
index 52e20c9a46a58be4328276964c1bb255c51a423c..789feeae6c44a82b44e040ae2a6bec6f26cbe450 100644 (file)
@@ -11,6 +11,7 @@
 #include <asm/unaligned.h>
 #include <net/tcp.h>
 #include <net/netns/generic.h>
+#include <linux/proc_fs.h>
 
 #include <linux/netfilter_ipv4/ip_tables.h>
 #include <linux/netfilter/x_tables.h>