summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2023-09-20 19:37:21 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2023-11-03 12:23:37 +0100
commit293432efa847864e2bece638181fc7107b4abde0 (patch)
treee40d2e2fe0cf2496acc3bef6fe39e8430711e876
parent8db9eb7543e9e5ecd22be2397c1201f67d057040 (diff)
parser_json: Fix limit object burst value parsing
commit 29aeff471496b6b1ae9a08dada21a5a9278467cf upstream. The field is of type uint32_t, use lower case 'i' format specifier. Fixes: c36288dbe2ba3 ("JSON: Fix parsing and printing of limit objects") Signed-off-by: Phil Sutter <phil@nwl.cc>
-rw-r--r--src/parser_json.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/parser_json.c b/src/parser_json.c
index 29d7b2c6..7bdd9645 100644
--- a/src/parser_json.c
+++ b/src/parser_json.c
@@ -3500,7 +3500,7 @@ static struct cmd *json_parse_cmd_add_object(struct json_ctx *ctx,
}
json_unpack(root, "{s:s}", "rate_unit", &rate_unit);
json_unpack(root, "{s:b}", "inv", &inv);
- json_unpack(root, "{s:I}", "burst", &obj->limit.burst);
+ json_unpack(root, "{s:i}", "burst", &obj->limit.burst);
json_unpack(root, "{s:s}", "burst_unit", &burst_unit);
if (!strcmp(rate_unit, "packets")) {