summaryrefslogtreecommitdiff
path: root/include/net
diff options
context:
space:
mode:
authorGao feng <gaofeng@cn.fujitsu.com>2013-01-21 22:10:27 +0000
committerPablo Neira Ayuso <pablo@netfilter.org>2013-01-23 12:55:39 +0100
commit73f4001a52c986114f540504d70b21e52eb0d92a (patch)
treedc14dd7bc44c9f49bdd14c7f4547ea56b89d8d50 /include/net
parentb7ff3a1fae78783e0ab1ef82f5978aeb89ddd16b (diff)
downloadlinux-3.10-73f4001a52c986114f540504d70b21e52eb0d92a.tar.gz
linux-3.10-73f4001a52c986114f540504d70b21e52eb0d92a.tar.bz2
linux-3.10-73f4001a52c986114f540504d70b21e52eb0d92a.zip
netfilter: nf_ct_tstamp: move initialization out of pernet_operations
Move the global initial codes to the module_init/exit context. Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/netfilter/nf_conntrack_timestamp.h21
1 files changed, 17 insertions, 4 deletions
diff --git a/include/net/netfilter/nf_conntrack_timestamp.h b/include/net/netfilter/nf_conntrack_timestamp.h
index fc9c82b1f06..b00461413ef 100644
--- a/include/net/netfilter/nf_conntrack_timestamp.h
+++ b/include/net/netfilter/nf_conntrack_timestamp.h
@@ -48,15 +48,28 @@ static inline void nf_ct_set_tstamp(struct net *net, bool enable)
}
#ifdef CONFIG_NF_CONNTRACK_TIMESTAMP
-extern int nf_conntrack_tstamp_init(struct net *net);
-extern void nf_conntrack_tstamp_fini(struct net *net);
+extern int nf_conntrack_tstamp_pernet_init(struct net *net);
+extern void nf_conntrack_tstamp_pernet_fini(struct net *net);
+
+extern int nf_conntrack_tstamp_init(void);
+extern void nf_conntrack_tstamp_fini(void);
#else
-static inline int nf_conntrack_tstamp_init(struct net *net)
+static inline int nf_conntrack_tstamp_pernet_init(struct net *net)
+{
+ return 0;
+}
+
+static inline void nf_conntrack_tstamp_pernet_fini(struct net *net)
+{
+ return;
+}
+
+static inline int nf_conntrack_tstamp_init(void)
{
return 0;
}
-static inline void nf_conntrack_tstamp_fini(struct net *net)
+static inline void nf_conntrack_tstamp_fini(void)
{
return;
}