Skip to content

Commit

Permalink
netfilter: use forward declaration instead of including linux/proc_fs.h
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Eric W. Biederman <[email protected]>
  • Loading branch information
ummakynes committed Jun 18, 2015
1 parent 04c52de commit 10c04a8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion include/net/netns/netfilter.h
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
1 change: 1 addition & 0 deletions net/netfilter/nf_synproxy_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 10c04a8

Please sign in to comment.