Re:Re: [PATCH nf v6 3/3] netfilter: nat_helper: Remove the expectations when its module is unloaded

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Liping,

At 2017-05-05 09:59:06, "Liping Zhang" <zlpnobody@xxxxxxxxx> wrote:
>Hi Feng,
>
>2017-05-05 8:55 GMT+08:00  <gfree.wind@xxxxxxxxxxx>:
>[...]
>> +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);

?韬{.n?壏煯壄?%娝?檩?w?{.n?壏租栕庄z_鉃豝n噐■?侂h櫒璀?{鄗夸z罐楘+€?zf"穐殘啳嗃i?飦?戧鐉_璁鎗:+v墾?撸鴐




[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux