diff options
author | Gao feng <gaofeng@cn.fujitsu.com> | 2013-03-25 03:50:40 +0400 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2013-04-05 22:12:54 +0400 |
commit | 30e0c6a6bee24db0166b7ca709277cd693e179f2 (patch) | |
tree | 264a13fcbf0d76de9e1b3f076ac7f8b045c6c5d5 /include/net/netns | |
parent | f3c1a44a2208d14b061ad665d9549c9b321f38e5 (diff) | |
download | linux-30e0c6a6bee24db0166b7ca709277cd693e179f2.tar.xz |
netfilter: nf_log: prepare net namespace support for loggers
This patch adds netns support to nf_log and it prepares netns
support for existing loggers. It is composed of four major
changes.
1) nf_log_register has been split to two functions: nf_log_register
and nf_log_set. The new nf_log_register is used to globally
register the nf_logger and nf_log_set is used for enabling
pernet support from nf_loggers.
Per netns is not yet complete after this patch, it comes in
separate follow up patches.
2) Add net as a parameter of nf_log_bind_pf. Per netns is not
yet complete after this patch, it only allows to bind the
nf_logger to the protocol family from init_net and it skips
other cases.
3) Adapt all nf_log_packet callers to pass netns as parameter.
After this patch, this function only works for init_net.
4) Make the sysctl net/netfilter/nf_log pernet.
Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/net/netns')
-rw-r--r-- | include/net/netns/netfilter.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/net/netns/netfilter.h b/include/net/netns/netfilter.h index 248ca1c68dba..88740024ccf3 100644 --- a/include/net/netns/netfilter.h +++ b/include/net/netns/netfilter.h @@ -2,10 +2,17 @@ #define __NETNS_NETFILTER_H #include <linux/proc_fs.h> +#include <linux/netfilter.h> + +struct nf_logger; struct netns_nf { #if defined CONFIG_PROC_FS struct proc_dir_entry *proc_netfilter; #endif + const struct nf_logger __rcu *nf_loggers[NFPROTO_NUMPROTO]; +#ifdef CONFIG_SYSCTL + struct ctl_table_header *nf_log_dir_header; +#endif }; #endif |