From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Nicole <nicole@cats-muvva.net>
Cc: netfilter@vger.kernel.org
Subject: Re: Connection Tracking
Date: Tue, 4 Sep 2012 13:30:16 +0200 [thread overview]
Message-ID: <20120904113016.GA2920@1984> (raw)
In-Reply-To: <5044DC6C.1070806@cats-muvva.net>
On Mon, Sep 03, 2012 at 05:35:56PM +0100, Nicole wrote:
> Hello everyone,
>
> I would be grateful for some advice. Am writing a target using xtables.
> This target saves and restores a field in the IPv{4,6} header to/from
> the connection mark.
>
> I have read Jan Engelhardt's booklet (3 July 2012), but remain unclear
> on how to ensure that connection tracking is turned on.
>
> My difficulty arises in the following code snippet:
>
> const struct nf_conn *ct;
> ct = nf_ct_get(skb, &ctinfo);
> if (ct == NULL) {
> return false;
> }
> /* use ct-> */
>
> ct is always false and therefore I cannot do the save and restore.
>
> Any suggestions?
Make sure nf_conntrack and nf_conntrack_ipv4 are loaded.
next prev parent reply other threads:[~2012-09-04 11:30 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-03 16:35 Connection Tracking Nicole
2012-09-04 11:30 ` Pablo Neira Ayuso [this message]
-- strict thread matches above, loose matches on Subject: below --
2003-10-06 17:46 Nathan Whittacre
2003-10-08 16:46 ` Jim Carter
2003-10-08 17:41 ` Nathan Whittacre
2003-10-08 18:09 ` Jim Carter
2003-10-06 17:42 Nathan Whittacre
2003-01-09 6:40 Amit Kumar Gupta
2002-06-21 15:25 Preston Wade
2002-06-21 14:54 Preston Wade
2002-06-21 15:03 ` Ramin Alidousti
2002-06-21 15:05 ` Antony Stone
2002-06-21 15:16 ` Patrick Schaaf
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=20120904113016.GA2920@1984 \
--to=pablo@netfilter.org \
--cc=netfilter@vger.kernel.org \
--cc=nicole@cats-muvva.net \
/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).