]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
json: limit: set default burst to 5
authorFlorian Westphal <fw@strlen.de>
Thu, 21 Jan 2021 13:43:52 +0000 (14:43 +0100)
committerFlorian Westphal <fw@strlen.de>
Thu, 21 Jan 2021 13:47:40 +0000 (14:47 +0100)
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

index f0486b77a225af6077ef2eee52a5e714d2efede4..2d132caf529cd3239b1f361be177be2ef4c55eac 100644 (file)
@@ -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;