All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: <netfilter-devel@vger.kernel.org>
Cc: Florian Westphal <fw@strlen.de>
Subject: [PATCH 2/4] json: limit: set default burst to 5
Date: Thu, 21 Jan 2021 14:55:08 +0100	[thread overview]
Message-ID: <20210121135510.14941-3-fw@strlen.de> (raw)
In-Reply-To: <20210121135510.14941-1-fw@strlen.de>

The tests fail because json printing omits a burst of 5 and
the parser treats that as 'burst 0'.

Signed-off-by: Florian Westphal <fw@strlen.de>
---
 src/parser_json.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/parser_json.c b/src/parser_json.c
index f0486b77a225..2d132caf529c 100644
--- a/src/parser_json.c
+++ b/src/parser_json.c
@@ -1784,7 +1784,7 @@ static struct stmt *json_parse_limit_stmt(struct json_ctx *ctx,
 					  const char *key, json_t *value)
 {
 	struct stmt *stmt;
-	uint64_t rate, burst = 0;
+	uint64_t rate, burst = 5;
 	const char *rate_unit = "packets", *time, *burst_unit = "bytes";
 	int inv = 0;
 
-- 
2.26.2


  parent reply	other threads:[~2021-01-21 13:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-21 13:55 [PATCH nft 0/4] json test case fixups Florian Westphal
2021-01-21 13:55 ` [PATCH 1/4] json: fix icmpv6.t test cases Florian Westphal
2021-01-21 15:12   ` Phil Sutter
2021-01-21 13:55 ` Florian Westphal [this message]
2021-01-21 14:44   ` [PATCH 2/4] json: limit: set default burst to 5 Phil Sutter
2021-01-21 14:57     ` Pablo Neira Ayuso
2021-01-21 14:59       ` Pablo Neira Ayuso
2021-01-21 15:10         ` Phil Sutter
2021-01-21 13:55 ` [PATCH 3/4] json: ct: add missing rule Florian Westphal
2021-01-21 15:13   ` Phil Sutter
2021-01-21 13:55 ` [PATCH 4/4] json: icmp: refresh json output Florian Westphal
2021-01-21 15:04   ` Phil Sutter

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=20210121135510.14941-3-fw@strlen.de \
    --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 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.