summaryrefslogtreecommitdiffstats
path: root/net/netfilter/nf_conntrack_core.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso2018-05-23 09:17:12 +0200
committerPablo Neira Ayuso2018-05-23 09:26:06 +0200
commit1f4b24397d3e164dde7026b91056e67304724fb6 (patch)
tree9b9a6679e39e9f3a98c39763538b480b06251449 /net/netfilter/nf_conntrack_core.c
parentnetfilter: ip6t_rpfilter: provide input interface for route lookup (diff)
downloadkernel-qcow2-linux-1f4b24397d3e164dde7026b91056e67304724fb6.tar.gz
kernel-qcow2-linux-1f4b24397d3e164dde7026b91056e67304724fb6.tar.xz
kernel-qcow2-linux-1f4b24397d3e164dde7026b91056e67304724fb6.zip
netfilter: add struct nf_ct_hook and use it
Move the nf_ct_destroy indirection to the struct nf_ct_hook. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter/nf_conntrack_core.c')
-rw-r--r--net/netfilter/nf_conntrack_core.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c
index 605441727008..8b2a8644d955 100644
--- a/net/netfilter/nf_conntrack_core.c
+++ b/net/netfilter/nf_conntrack_core.c
@@ -1813,8 +1813,7 @@ void nf_conntrack_cleanup_start(void)
void nf_conntrack_cleanup_end(void)
{
- RCU_INIT_POINTER(nf_ct_destroy, NULL);
-
+ RCU_INIT_POINTER(nf_ct_hook, NULL);
cancel_delayed_work_sync(&conntrack_gc_work.dwork);
nf_ct_free_hashtable(nf_conntrack_hash, nf_conntrack_htable_size);
@@ -2131,11 +2130,15 @@ err_cachep:
return ret;
}
+static struct nf_ct_hook nf_conntrack_hook = {
+ .destroy = destroy_conntrack,
+};
+
void nf_conntrack_init_end(void)
{
/* For use by REJECT target */
RCU_INIT_POINTER(ip_ct_attach, nf_conntrack_attach);
- RCU_INIT_POINTER(nf_ct_destroy, destroy_conntrack);
+ RCU_INIT_POINTER(nf_ct_hook, &nf_conntrack_hook);
}
/*