]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
parser_json: Default meter size to zero
authorPhil Sutter <phil@nwl.cc>
Wed, 20 Sep 2023 15:16:33 +0000 (17:16 +0200)
committerPhil Sutter <phil@nwl.cc>
Fri, 22 Sep 2023 08:55:25 +0000 (10:55 +0200)
JSON parser was missed when performing the same change in standard
syntax parser.

Fixes: c2cad53ffc22a ("meters: do not set a defaut meter size from userspace")
Signed-off-by: Phil Sutter <phil@nwl.cc>
src/parser_json.c

index c4a097972c67b5e7a8624745fc76b6457cea2d8b..df327e9558e0618e9e7f2ba0d794a751cf02369c 100644 (file)
@@ -2687,7 +2687,7 @@ static struct stmt *json_parse_meter_stmt(struct json_ctx *ctx,
        json_t *jkey, *jstmt;
        struct stmt *stmt;
        const char *name;
-       uint32_t size = 0xffff;
+       uint32_t size = 0;
 
        if (json_unpack_err(ctx, value, "{s:s, s:o, s:o}",
                            "name", &name, "key", &jkey, "stmt", &jstmt))