From: "James King" <t.james.king@gmail.com>
To: "Piotr Duszynski" <regis44@gmail.com>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH 1/1 ] Conntrack extensions : Interrupt timeout
Date: Wed, 17 Dec 2008 18:36:35 -0800 [thread overview]
Message-ID: <38bcb3ec0812171836r4c6161b2m1026d73722a72cfe@mail.gmail.com> (raw)
In-Reply-To: <49495F88.2010103@gmail.com>
On Wed, Dec 17, 2008 at 12:22 PM, Piotr Duszynski <regis44@gmail.com> wrote:
> I wanted to write a module that would track all the MAC information for
> all established connections. Unfortunately, after the module is loaded
> and all the information is being properly recorded to the conntrack
> computer hangs . I can read that it is related with interrupt timeout,
> but after several hours of trying to fix this I am still in the same
> spot . I would really appreciate any guidance in this matter .
>
> + l2info = nfct_l2info(ct);
> + if (!l2info) {
> + printk(KERN_INFO "Adding L2INFO extension\n");
> + l2info = nf_ct_ext_add(ct, NF_CT_EXT_L2INFO,GFP_ATOMIC);
You shouldn't call nf_ct_ext_add from within your target, as your
private structure needs to be added before the conntrack is confirmed
(preferably at allocation time). From _nf_ct_ext_add() in
nf_conntrack_extend.c:
/* Conntrack must not be confirmed to avoid races on reallocation. */
NF_CT_ASSERT(!nf_ct_is_confirmed(ct));
Take a look at init_conntrack() in nf_conntrack_core.c to see how
nf_conntrack_acct does it. lxr.linux.no is your friend :)
HTH,
James
next prev parent reply other threads:[~2008-12-18 2:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-15 15:42 netfilter: ctnetlink: fix missing CTA_NAT_SEQ_UNSPEC Patrick McHardy
2008-12-16 9:20 ` David Miller
2008-12-17 20:22 ` [PATCH 1/1 ] Conntrack extensions : Interrupt timeout Piotr Duszynski
2008-12-18 2:36 ` James King [this message]
[not found] ` <494D4A11.5080304@gmail.com>
2008-12-22 9:07 ` James King
2008-12-22 10:46 ` Piotr Duszynski
2008-12-22 19:22 ` Piotr Duszynski
2008-12-24 19:10 ` Jan Engelhardt
2008-12-22 10:36 ` Piotr Duszynski
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=38bcb3ec0812171836r4c6161b2m1026d73722a72cfe@mail.gmail.com \
--to=t.james.king@gmail.com \
--cc=netfilter-devel@vger.kernel.org \
--cc=regis44@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 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).