Commit b334aadc authored by Patrick McHardy's avatar Patrick McHardy Committed by David S. Miller

[NETFILTER]: nf_conntrack: clean up a few header files

- Remove declarations of non-existing variables and functions
- Move helper init/cleanup function declarations to nf_conntrack_helper.h
- Remove unneeded __nf_conntrack_attach declaration and make it static
Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4f536522
...@@ -223,8 +223,6 @@ extern void nf_conntrack_tcp_update(struct sk_buff *skb, ...@@ -223,8 +223,6 @@ extern void nf_conntrack_tcp_update(struct sk_buff *skb,
/* Fake conntrack entry for untracked connections */ /* Fake conntrack entry for untracked connections */
extern struct nf_conn nf_conntrack_untracked; extern struct nf_conn nf_conntrack_untracked;
extern int nf_ct_no_defrag;
/* Iterate over all conntracks: if iter returns true, it's deleted. */ /* Iterate over all conntracks: if iter returns true, it's deleted. */
extern void extern void
nf_ct_iterate_cleanup(int (*iter)(struct nf_conn *i, void *data), void *data); nf_ct_iterate_cleanup(int (*iter)(struct nf_conn *i, void *data), void *data);
...@@ -264,10 +262,5 @@ do { \ ...@@ -264,10 +262,5 @@ do { \
local_bh_enable(); \ local_bh_enable(); \
} while (0) } while (0)
extern int
nf_conntrack_register_cache(u_int32_t features, const char *name, size_t size);
extern void
nf_conntrack_unregister_cache(u_int32_t features);
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
#endif /* _NF_CONNTRACK_H */ #endif /* _NF_CONNTRACK_H */
...@@ -30,16 +30,6 @@ extern void nf_conntrack_cleanup(void); ...@@ -30,16 +30,6 @@ extern void nf_conntrack_cleanup(void);
extern int nf_conntrack_proto_init(void); extern int nf_conntrack_proto_init(void);
extern void nf_conntrack_proto_fini(void); extern void nf_conntrack_proto_fini(void);
extern int nf_conntrack_helper_init(void);
extern void nf_conntrack_helper_fini(void);
struct nf_conntrack_l3proto;
extern struct nf_conntrack_l3proto *nf_ct_find_l3proto(u_int16_t pf);
/* Like above, but you already have conntrack read lock. */
extern struct nf_conntrack_l3proto *__nf_ct_find_l3proto(u_int16_t l3proto);
struct nf_conntrack_l4proto;
extern int extern int
nf_ct_get_tuple(const struct sk_buff *skb, nf_ct_get_tuple(const struct sk_buff *skb,
unsigned int nhoff, unsigned int nhoff,
...@@ -76,8 +66,6 @@ static inline int nf_conntrack_confirm(struct sk_buff *skb) ...@@ -76,8 +66,6 @@ static inline int nf_conntrack_confirm(struct sk_buff *skb)
return ret; return ret;
} }
extern void __nf_conntrack_attach(struct sk_buff *nskb, struct sk_buff *skb);
int int
print_tuple(struct seq_file *s, const struct nf_conntrack_tuple *tuple, print_tuple(struct seq_file *s, const struct nf_conntrack_tuple *tuple,
struct nf_conntrack_l3proto *l3proto, struct nf_conntrack_l3proto *l3proto,
......
...@@ -58,4 +58,8 @@ static inline struct nf_conn_help *nfct_help(const struct nf_conn *ct) ...@@ -58,4 +58,8 @@ static inline struct nf_conn_help *nfct_help(const struct nf_conn *ct)
{ {
return nf_ct_ext_find(ct, NF_CT_EXT_HELPER); return nf_ct_ext_find(ct, NF_CT_EXT_HELPER);
} }
extern int nf_conntrack_helper_init(void);
extern void nf_conntrack_helper_fini(void);
#endif /*_NF_CONNTRACK_HELPER_H*/ #endif /*_NF_CONNTRACK_HELPER_H*/
...@@ -861,7 +861,7 @@ EXPORT_SYMBOL_GPL(nf_ct_port_nlattr_to_tuple); ...@@ -861,7 +861,7 @@ EXPORT_SYMBOL_GPL(nf_ct_port_nlattr_to_tuple);
#endif #endif
/* Used by ipt_REJECT and ip6t_REJECT. */ /* Used by ipt_REJECT and ip6t_REJECT. */
void __nf_conntrack_attach(struct sk_buff *nskb, struct sk_buff *skb) static void nf_conntrack_attach(struct sk_buff *nskb, struct sk_buff *skb)
{ {
struct nf_conn *ct; struct nf_conn *ct;
enum ip_conntrack_info ctinfo; enum ip_conntrack_info ctinfo;
...@@ -878,7 +878,6 @@ void __nf_conntrack_attach(struct sk_buff *nskb, struct sk_buff *skb) ...@@ -878,7 +878,6 @@ void __nf_conntrack_attach(struct sk_buff *nskb, struct sk_buff *skb)
nskb->nfctinfo = ctinfo; nskb->nfctinfo = ctinfo;
nf_conntrack_get(nskb->nfct); nf_conntrack_get(nskb->nfct);
} }
EXPORT_SYMBOL_GPL(__nf_conntrack_attach);
static inline int static inline int
do_iter(const struct nf_conntrack_tuple_hash *i, do_iter(const struct nf_conntrack_tuple_hash *i,
...@@ -1122,7 +1121,7 @@ int __init nf_conntrack_init(void) ...@@ -1122,7 +1121,7 @@ int __init nf_conntrack_init(void)
goto out_fini_expect; goto out_fini_expect;
/* For use by REJECT target */ /* For use by REJECT target */
rcu_assign_pointer(ip_ct_attach, __nf_conntrack_attach); rcu_assign_pointer(ip_ct_attach, nf_conntrack_attach);
rcu_assign_pointer(nf_ct_destroy, destroy_conntrack); rcu_assign_pointer(nf_ct_destroy, destroy_conntrack);
/* Set up fake conntrack: /* Set up fake conntrack:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment