netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH 4/4] netfilter: conntrack: optional reliable conntrack event	delivery
Date: Wed, 10 Jun 2009 17:04:51 +0200	[thread overview]
Message-ID: <4A2FCB93.3090507@trash.net> (raw)
In-Reply-To: <4A2FC9B5.8030600@netfilter.org>

Pablo Neira Ayuso wrote:
> There's another issue that I have to fix here that I haven't noticed so far:
> 
> +       if (nf_conntrack_event_report(IPCT_DESTROY, ct,
> +                                     NETLINK_CB(skb).pid,
> +                                     nlmsg_report(nlh)) < 0) {
> +               nf_ct_delete_from_lists(ct);
> +               /* we failed to report the event, try later */
> +               nf_ct_insert_dying_list(ct);
> +               nf_ct_put(ct);
> +               return 0;
> +       }
> 
> With this, we send the first destroy event including the netlink pid.
> However, in the second try, we send it using netlink pid 0. The netlink
> pid is important to notice who has triggered this event (the kernel,
> myself or a different process). So I think that I need to add some
> structure like:
> 
> struct nf_conn_dying {
> 	struct list_head head;
> 	u32 pid;
> 	struct nf_conn *ct;
> };
> 
> Thus, destroy events are delivered using the original netlink pid. I can
> get rid of using the nulls list in that case.
> 
> I think this is necessary, or I'm completely driving nuts and seeing
> ghosts everywhere :D.

I agree, this is necessary. But I'd add the pid to the event structure
instead of adding a completely new structure I think. Or perhaps we can
reuse an unused-at-that-time conntrack member.

> Patrick, You still plan to send the patches for
> 2.6.31 along today? I think that I need one extra day, I have to leave
> now and I cannot work on this until tomorrow morning.

Yes, the networking merge window closes a lot earlier than the general
kernel merge window and I have to get the other patches in.

I can delay it today, but I don't want to risk waiting until tomorrow.

  reply	other threads:[~2009-06-10 15:04 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-10 13:40 [PATCH 0/4] improve conntrack event reliability (try 3) Pablo Neira Ayuso
2009-06-10 13:40 ` [PATCH 1/4] netfilter: conntrack: move event caching to conntrack extension infrastructure Pablo Neira Ayuso
2009-06-10 13:41 ` [PATCH 2/4] netfilter: conntrack: move helper destruction to nf_ct_helper_destroy() Pablo Neira Ayuso
2009-06-10 13:41 ` [PATCH 3/4] list_nulls: add hlist_nulls_add_head and hlist_nulls_del Pablo Neira Ayuso
2009-06-10 13:41 ` [PATCH 4/4] netfilter: conntrack: optional reliable conntrack event delivery Pablo Neira Ayuso
2009-06-10 13:47   ` Pablo Neira Ayuso
2009-06-10 13:48     ` Patrick McHardy
2009-06-10 14:56       ` Pablo Neira Ayuso
2009-06-10 15:04         ` Patrick McHardy [this message]
2009-06-10 15:10           ` Pablo Neira Ayuso
2009-06-10 20:07             ` Pablo Neira Ayuso

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=4A2FCB93.3090507@trash.net \
    --to=kaber@trash.net \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).