From: Patrick McHardy <kaber@trash.net>
To: Florian Westphal <fw@strlen.de>
Cc: Kristian Evensen <kristian.evensen@gmail.com>,
netfilter-devel@vger.kernel.org
Subject: Re: [PATCH netfilter: nft] Add the connmark meta_key
Date: Mon, 6 Jan 2014 17:15:23 +0000 [thread overview]
Message-ID: <20140106171523.GC23002@macbook.localnet> (raw)
In-Reply-To: <20140106170523.GA9894@breakpoint.cc>
On Mon, Jan 06, 2014 at 06:05:23PM +0100, Florian Westphal wrote:
> Kristian Evensen <kristian.evensen@gmail.com> wrote:
> > From: Kristian Evensen <kristian.evensen@gmail.com>
> >
> > This patch enables connmark to be set/retrieved using meta
> > expressions/statements.
> >
> > Signed-off-by: Kristian Evensen <kristian.evensen@gmail.com>
> > ---
> > include/uapi/linux/netfilter/nf_tables.h | 2 ++
> > net/netfilter/nft_meta.c | 34 ++++++++++++++++++++++++++++++++
> > 2 files changed, 36 insertions(+)
> >
> > diff --git a/include/uapi/linux/netfilter/nf_tables.h b/include/uapi/linux/netfilter/nf_tables.h
> > index aa86a152..05eaeb9 100644
> > --- a/include/uapi/linux/netfilter/nf_tables.h
> > +++ b/include/uapi/linux/netfilter/nf_tables.h
> > @@ -531,6 +531,7 @@ enum nft_exthdr_attributes {
> > * @NFT_META_NFTRACE: packet nftrace bit
> > * @NFT_META_RTCLASSID: realm value of packet's route (skb->dst->tclassid)
> > * @NFT_META_SECMARK: packet secmark (skb->secmark)
> > + * @NFT_META_CONNMARK: used to get/set the connection mark
> > */
> > enum nft_meta_keys {
> > NFT_META_LEN,
> > @@ -548,6 +549,7 @@ enum nft_meta_keys {
> > NFT_META_NFTRACE,
> > NFT_META_RTCLASSID,
> > NFT_META_SECMARK,
> > + NFT_META_CONNMARK,
> > };
>
> This looks wrong, meta is for packet properties.
> You should probably use NFT_CT_MARK from nft_ct_keys enum.
Well, actually the ct expression already supports connmark, as does userspace.
#ifdef CONFIG_NF_CONNTRACK_MARK
case NFT_CT_MARK:
dest->data[0] = ct->mark;
return;
#endif
next prev parent reply other threads:[~2014-01-06 17:15 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-06 16:57 [PATCH netfilter: nft] Add the connmark meta_key Kristian Evensen
2014-01-06 17:04 ` Patrick McHardy
2014-01-06 17:05 ` Florian Westphal
2014-01-06 17:15 ` Patrick McHardy [this message]
2014-01-06 18:09 ` Kristian Evensen
2014-01-06 18:19 ` Patrick McHardy
2014-01-06 19:25 ` Kristian Evensen
2014-01-06 20:54 ` Patrick McHardy
2014-01-06 21:00 ` Kristian Evensen
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=20140106171523.GC23002@macbook.localnet \
--to=kaber@trash.net \
--cc=fw@strlen.de \
--cc=kristian.evensen@gmail.com \
--cc=netfilter-devel@vger.kernel.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 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.