diff options
author | Gao feng <gaofeng@cn.fujitsu.com> | 2013-01-21 17:10:28 -0500 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2013-01-23 06:55:50 -0500 |
commit | 3fe0f943d4f52f875f0fdf8dbe472c8a9b852891 (patch) | |
tree | dc2bde810da925172a0b8253a3df360005abd916 /include/net | |
parent | 73f4001a52c986114f540504d70b21e52eb0d92a (diff) |
netfilter: nf_ct_ecache: 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_ecache.h | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/include/net/netfilter/nf_conntrack_ecache.h b/include/net/netfilter/nf_conntrack_ecache.h index 5654d292efd4..092dc651689f 100644 --- a/include/net/netfilter/nf_conntrack_ecache.h +++ b/include/net/netfilter/nf_conntrack_ecache.h | |||
@@ -207,9 +207,11 @@ nf_ct_expect_event(enum ip_conntrack_expect_events event, | |||
207 | nf_ct_expect_event_report(event, exp, 0, 0); | 207 | nf_ct_expect_event_report(event, exp, 0, 0); |
208 | } | 208 | } |
209 | 209 | ||
210 | extern int nf_conntrack_ecache_init(struct net *net); | 210 | extern int nf_conntrack_ecache_pernet_init(struct net *net); |
211 | extern void nf_conntrack_ecache_fini(struct net *net); | 211 | extern void nf_conntrack_ecache_pernet_fini(struct net *net); |
212 | 212 | ||
213 | extern int nf_conntrack_ecache_init(void); | ||
214 | extern void nf_conntrack_ecache_fini(void); | ||
213 | #else /* CONFIG_NF_CONNTRACK_EVENTS */ | 215 | #else /* CONFIG_NF_CONNTRACK_EVENTS */ |
214 | 216 | ||
215 | static inline void nf_conntrack_event_cache(enum ip_conntrack_events event, | 217 | static inline void nf_conntrack_event_cache(enum ip_conntrack_events event, |
@@ -232,12 +234,21 @@ static inline void nf_ct_expect_event_report(enum ip_conntrack_expect_events e, | |||
232 | u32 portid, | 234 | u32 portid, |
233 | int report) {} | 235 | int report) {} |
234 | 236 | ||
235 | static inline int nf_conntrack_ecache_init(struct net *net) | 237 | static inline int nf_conntrack_ecache_pernet_init(struct net *net) |
236 | { | 238 | { |
237 | return 0; | 239 | return 0; |
238 | } | 240 | } |
239 | 241 | ||
240 | static inline void nf_conntrack_ecache_fini(struct net *net) | 242 | static inline void nf_conntrack_ecache_pernet_fini(struct net *net) |
243 | { | ||
244 | } | ||
245 | |||
246 | static inline int nf_conntrack_ecache_init(void) | ||
247 | { | ||
248 | return 0; | ||
249 | } | ||
250 | |||
251 | static inline void nf_conntrack_ecache_fini(void) | ||
241 | { | 252 | { |
242 | } | 253 | } |
243 | #endif /* CONFIG_NF_CONNTRACK_EVENTS */ | 254 | #endif /* CONFIG_NF_CONNTRACK_EVENTS */ |