From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Elise Lennion <elise.lennion@gmail.com>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH nft] src: Allow to list ruleset without stateful information
Date: Mon, 16 Jan 2017 11:30:15 +0100 [thread overview]
Message-ID: <20170116103015.GA5482@salvia> (raw)
In-Reply-To: <20170113145058.GA8030@lennorien.com>
On Fri, Jan 13, 2017 at 12:50:58PM -0200, Elise Lennion wrote:
> Currently only counter and quota have stateful information.
>
> Standard list ruleset:
>
> table ip x {
> chain y {
> type filter hook output priority 0; policy accept;
> tcp dport https counter packets 149 bytes 10085
> tcp dport https quota 1025 mbytes used 9 kbytes
> }
> }
>
> With stateless option, -s:
>
> table ip x {
> chain y {
> type filter hook output priority 0; policy accept;
> tcp dport https counter
> tcp dport https quota 1025 mbytes
> }
> }
This looks fine.
But you also have to update obj_print_data().
Stateful objects is a new thing, so please make sure you run a fresh
kernel, latest libnftnl and nft. You have examples here:
http://marc.info/?l=netfilter-devel&m=148029128323837&w=2
Note: For stateful counter with a name, at this stage, probably best
thing is to display 0 both for packets and bytes instead of removing
them, ie.
# nft list counters
table ip filter {
counter http-traffic {
packets 0 bytes 0
}
}
Thanks.
prev parent reply other threads:[~2017-01-16 10:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-13 14:50 [PATCH nft] src: Allow to list ruleset without stateful information Elise Lennion
2017-01-16 10:30 ` Pablo Neira Ayuso [this message]
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=20170116103015.GA5482@salvia \
--to=pablo@netfilter.org \
--cc=elise.lennion@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.