All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Gao Feng" <gfree.wind@vip.163.com>
To: "Liping Zhang" <zlpnobody@gmail.com>
Cc: "Pablo Neira Ayuso" <pablo@netfilter.org>,
	"Jozsef Kadlecsik" <kadlec@blackhole.kfki.hu>,
	"Florian Westphal" <fw@strlen.de>,
	"Netfilter Developer Mailing List"
	<netfilter-devel@vger.kernel.org>
Subject: Re:Re: [PATCH nf v6 3/3] netfilter: nat_helper: Remove the expectations when its module is unloaded
Date: Fri, 5 May 2017 10:16:02 +0800 (CST)	[thread overview]
Message-ID: <8ccdcf7.2344.15bd66481be.Coremail.gfree.wind@vip.163.com> (raw)
In-Reply-To: <CAML_gOfbrRG8LDD11PzpMmGqnq0-JpXKGk4Z=OJH3gEDnzCCxg@mail.gmail.com>

Hi Liping,

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


      reply	other threads:[~2017-05-05  2:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-05  0:55 [PATCH nf v6 1/3] netfilter: helper: Rename struct nf_ct_helper_expectfn to nf_ct_nat_helper gfree.wind
2017-05-05  0:55 ` [PATCH nf v6 2/3] netfilter: nat_helper: Register one nf_ct_nat_helper each proto nat module gfree.wind
2017-05-15 17:20   ` Pablo Neira Ayuso
2017-05-05  0:55 ` [PATCH nf v6 3/3] netfilter: nat_helper: Remove the expectations when its module is unloaded gfree.wind
2017-05-05  1:59   ` Liping Zhang
2017-05-05  2:16     ` Gao Feng [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8ccdcf7.2344.15bd66481be.Coremail.gfree.wind@vip.163.com \
    --to=gfree.wind@vip.163.com \
    --cc=fw@strlen.de \
    --cc=kadlec@blackhole.kfki.hu \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    --cc=zlpnobody@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.