From: Florian Westphal Date: Thu, 21 Jan 2021 13:43:52 +0000 (+0100) Subject: json: limit: set default burst to 5 X-Git-Tag: v0.9.9~148 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=acea765af76e0d28922437d45b9e0efaa95c1db7;p=thirdparty%2Fnftables.git json: limit: set default burst to 5 The tests fail because json printing omits a burst of 5 and the parser treats that as 'burst 0'. Signed-off-by: Florian Westphal --- diff --git a/src/parser_json.c b/src/parser_json.c index f0486b77..2d132caf 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;