diff options
author | Gao feng <gaofeng@cn.fujitsu.com> | 2013-01-23 06:51:10 -0500 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2013-01-23 08:40:53 -0500 |
commit | c296bb4d5d417d466c9bcc8afef68a3db5449a64 (patch) | |
tree | 1dbf5d626c82609b9267b392c9b80e767053959b /include/net | |
parent | 6330750d566d764ce4916d8fe2bcdcad28fc7a42 (diff) |
netfilter: nf_conntrack: refactor l4proto support for netns
Move the code that register/unregister l4proto to the
module_init/exit context.
Given that we have to modify some interfaces to accomodate
these changes, it is a good time to use shorter function names
for this using the nf_ct_* prefix instead of nf_conntrack_*,
that is:
nf_ct_l4proto_register
nf_ct_l4proto_pernet_register
nf_ct_l4proto_unregister
nf_ct_l4proto_pernet_unregister
We same many line breaks with it.
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_l4proto.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/include/net/netfilter/nf_conntrack_l4proto.h b/include/net/netfilter/nf_conntrack_l4proto.h index c3be4aef6bf7..914d8d900798 100644 --- a/include/net/netfilter/nf_conntrack_l4proto.h +++ b/include/net/netfilter/nf_conntrack_l4proto.h | |||
@@ -121,12 +121,16 @@ extern struct nf_conntrack_l4proto * | |||
121 | nf_ct_l4proto_find_get(u_int16_t l3proto, u_int8_t l4proto); | 121 | nf_ct_l4proto_find_get(u_int16_t l3proto, u_int8_t l4proto); |
122 | extern void nf_ct_l4proto_put(struct nf_conntrack_l4proto *p); | 122 | extern void nf_ct_l4proto_put(struct nf_conntrack_l4proto *p); |
123 | 123 | ||
124 | /* Protocol registration. */ | 124 | /* Protocol pernet registration. */ |
125 | extern int nf_conntrack_l4proto_register(struct net *net, | 125 | extern int nf_ct_l4proto_pernet_register(struct net *net, |
126 | struct nf_conntrack_l4proto *proto); | 126 | struct nf_conntrack_l4proto *proto); |
127 | extern void nf_conntrack_l4proto_unregister(struct net *net, | 127 | extern void nf_ct_l4proto_pernet_unregister(struct net *net, |
128 | struct nf_conntrack_l4proto *proto); | 128 | struct nf_conntrack_l4proto *proto); |
129 | 129 | ||
130 | /* Protocol global registration. */ | ||
131 | extern int nf_ct_l4proto_register(struct nf_conntrack_l4proto *proto); | ||
132 | extern void nf_ct_l4proto_unregister(struct nf_conntrack_l4proto *proto); | ||
133 | |||
130 | static inline void nf_ct_kfree_compat_sysctl_table(struct nf_proto_net *pn) | 134 | static inline void nf_ct_kfree_compat_sysctl_table(struct nf_proto_net *pn) |
131 | { | 135 | { |
132 | #if defined(CONFIG_SYSCTL) && defined(CONFIG_NF_CONNTRACK_PROC_COMPAT) | 136 | #if defined(CONFIG_SYSCTL) && defined(CONFIG_NF_CONNTRACK_PROC_COMPAT) |