All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: Kristian Evensen <kristian.evensen@gmail.com>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH netfilter: nft] netfilter: nf_tables Add set op to nft_ct module
Date: Tue, 7 Jan 2014 16:32:10 +0100	[thread overview]
Message-ID: <20140107153210.GG9894@breakpoint.cc> (raw)
In-Reply-To: <1389107719-24280-1-git-send-email-kristian.evensen@gmail.com>

Kristian Evensen <kristian.evensen@gmail.com> wrote:
> +static void nft_ct_set_eval(const struct nft_expr *expr,
> +			    struct nft_data data[NFT_REG_MAX + 1],
> +			    const struct nft_pktinfo *pkt)
> +{
> +	const struct nft_ct *priv = nft_expr_priv(expr);
> +	struct sk_buff *skb = pkt->skb;
> +	u32 value = data[priv->sreg].data[0];
> +	enum ip_conntrack_info ctinfo;
> +	struct nf_conn *ct;
> +
> +	ct = nf_ct_get(skb, &ctinfo);
> +
> +	if (ct == NULL)
> +		return;
> +
> +	switch (priv->key) {
> +#ifdef CONFIG_NF_CONNTRACK_MARK
> +	case NFT_CT_MARK:
> +		ct->mark = value;
> +		nf_conntrack_event_cache(IPCT_MARK, ct);

I think the event should only be raised when the mark value
is altered, else one might get nfct event storm.

  reply	other threads:[~2014-01-07 15:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-07 15:15 [PATCH netfilter: nft] netfilter: nf_tables Add set op to nft_ct module Kristian Evensen
2014-01-07 15:32 ` Florian Westphal [this message]
2014-01-07 15:34   ` 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=20140107153210.GG9894@breakpoint.cc \
    --to=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.