From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Fernando Fernandez Mancera <ffmancera@riseup.net>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH nft] json: add set statement list support
Date: Wed, 31 Aug 2022 17:02:50 +0200 [thread overview]
Message-ID: <Yw94Gux4j02HzCh2@salvia> (raw)
In-Reply-To: <20220831123731.26249-1-ffmancera@riseup.net>
Hi Fernando,
On Wed, Aug 31, 2022 at 02:37:31PM +0200, Fernando Fernandez Mancera wrote:
> When listing a set with statements with JSON support, the statements were
> ignored.
>
> Output example:
>
> {
> "set": {
> "op": "add",
> "elem": {
> "payload": {
> "protocol": "ip",
> "field": "saddr"
> }
> },
> "stmt": [
> {
> "limit": {
> "rate": 10,
> "burst": 5,
> "per": "second"
> }
> },
> {
> "counter": {
> "packets": 0,
> "bytes": 0
> }
> }
> ],
> "set": "@my_ssh_meter"
> }
> }
LGTM, thanks.
Would you also extend tests/shell? There is a
tests/shell/testcases/json/ folder where you can add one.
One example test can be found here: tests/shell/testcases/json/netdev
If you also create this folder:
tests/shell/testcases/json/dump/mytest.dump
where 'mytest' is the name of you script under tests/shell/testcases/json/
Then, it also checks for the expected output via 'nft list ruleset'.
next prev parent reply other threads:[~2022-08-31 15:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-31 12:37 [PATCH nft] json: add set statement list support Fernando Fernandez Mancera
2022-08-31 15:02 ` Pablo Neira Ayuso [this message]
2022-08-31 15:35 ` Fernando F. Mancera
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=Yw94Gux4j02HzCh2@salvia \
--to=pablo@netfilter.org \
--cc=ffmancera@riseup.net \
--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.