From: Florian Westphal <fw@strlen.de>
To: Florian Westphal <fw@strlen.de>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH nf-next] nftables: ct: add byte/packet counter support
Date: Fri, 8 Jan 2016 01:47:27 +0100 [thread overview]
Message-ID: <20160108004727.GF23789@breakpoint.cc> (raw)
In-Reply-To: <1452198864-10134-1-git-send-email-fw@strlen.de>
Florian Westphal <fw@strlen.de> wrote:
> If the accounting extension isn't present, we'll return a counter
> value of 0.
>
> Signed-off-by: Florian Westphal <fw@strlen.de>
> ---
> WARNING: It doesn't work, but AFAIU the bug is in nft_cmp which
> doesn't work with u64 and gt/lt test. Following is true after 1st packet
> is sent with enabled accounting:
>
> nft add rule filter input ct original packets gt 10
>
> Seems like it only works for mark, skuid etc because those are u32 and
> thus use the _fast_ops version.
I take that back -- nft_cmp is fine, the culprit is lack of cpu_to_be64
in nft. This works fine with a local patch to nft + nft_byteorder.c.
Problem was nft generated two htonl() calls for upper and lower half of
the counter which then makes nft_cmp behave a bit random ;)
I'll submit fixes soon.
next prev parent reply other threads:[~2016-01-08 0:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-07 20:34 [PATCH nf-next] nftables: ct: add byte/packet counter support Florian Westphal
2016-01-08 0:47 ` Florian Westphal [this message]
2016-01-08 1:33 ` Florian Westphal
2016-01-08 1:37 ` Florian Westphal
2016-01-08 12:38 ` Pablo Neira Ayuso
2016-01-08 12:43 ` Florian Westphal
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=20160108004727.GF23789@breakpoint.cc \
--to=fw@strlen.de \
--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 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).