|
@@ -616,7 +616,6 @@ __nf_conntrack_alloc(const struct nf_conntrack_tuple *orig,
|
|
memset(conntrack, 0, nf_ct_cache[features].size);
|
|
memset(conntrack, 0, nf_ct_cache[features].size);
|
|
conntrack->features = features;
|
|
conntrack->features = features;
|
|
atomic_set(&conntrack->ct_general.use, 1);
|
|
atomic_set(&conntrack->ct_general.use, 1);
|
|
- conntrack->ct_general.destroy = destroy_conntrack;
|
|
|
|
conntrack->tuplehash[IP_CT_DIR_ORIGINAL].tuple = *orig;
|
|
conntrack->tuplehash[IP_CT_DIR_ORIGINAL].tuple = *orig;
|
|
conntrack->tuplehash[IP_CT_DIR_REPLY].tuple = *repl;
|
|
conntrack->tuplehash[IP_CT_DIR_REPLY].tuple = *repl;
|
|
/* Don't set timer yet: wait for confirmation */
|
|
/* Don't set timer yet: wait for confirmation */
|
|
@@ -1122,6 +1121,8 @@ void nf_conntrack_cleanup(void)
|
|
while (atomic_read(&nf_conntrack_untracked.ct_general.use) > 1)
|
|
while (atomic_read(&nf_conntrack_untracked.ct_general.use) > 1)
|
|
schedule();
|
|
schedule();
|
|
|
|
|
|
|
|
+ rcu_assign_pointer(nf_ct_destroy, NULL);
|
|
|
|
+
|
|
for (i = 0; i < NF_CT_F_NUM; i++) {
|
|
for (i = 0; i < NF_CT_F_NUM; i++) {
|
|
if (nf_ct_cache[i].use == 0)
|
|
if (nf_ct_cache[i].use == 0)
|
|
continue;
|
|
continue;
|
|
@@ -1259,6 +1260,7 @@ int __init nf_conntrack_init(void)
|
|
|
|
|
|
/* 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);
|
|
|
|
|
|
/* Set up fake conntrack:
|
|
/* Set up fake conntrack:
|
|
- to never be deleted, not in any hashes */
|
|
- to never be deleted, not in any hashes */
|