Hi Liping, At 2017-05-05 09:59:06, "Liping Zhang" <zlpnob...@gmail.com> wrote: >Hi Feng, > >2017-05-05 8:55 GMT+08:00 <gfree.w...@vip.163.com>: >[...] >> +static void >> +nf_ct_flush_expect(const struct module *me) >> +{ >> + struct nf_conntrack_expect *exp; >> + const struct hlist_node *next; >> + u32 i; >> + >> + if (!me) >> + return; >> + >> + /* Get rid of expectations */ >> + spin_lock_bh(&nf_conntrack_expect_lock); >> + for (i = 0; i < nf_ct_expect_hsize; i++) { >> + hlist_for_each_entry_safe(exp, next, >> + &nf_ct_expect_hash[i], hnode) { >> + struct nf_conn_help *master_help = >> nfct_help(exp->master); >> + >> + if ((master_help->helper && master_help->helper->me >> == me) || >> + (exp->helper && exp->helper->me == me) || >> + (exp->nat_helper && exp->nat_helper->me == me)) { >> + /* This expect belongs to the dying module */ >> + if (del_timer(&exp->timeout)) { >> + nf_ct_unlink_expect(exp); >> + nf_ct_expect_put(exp); >> + } > >Is this should be replaced with your helper function nf_ct_remove_expect()?
Thanks. Because this helper was applied in nf-next.git before, not nf.git. So I didn't use the helper function. I just checked some days ago. I pull the nf.git codes just now, the helper is already synchronized at May 1st. But I don't pull the codes recently, so I didn't find it before. I would like to update it, but need to wait for a while to collect more comments. Thanks again. Best Regards Feng > >> + } >> + } >> + } >> + spin_unlock_bh(&nf_conntrack_expect_lock);