]> git.ipfire.org Git - thirdparty/nftables.git/commit
JSON: Simplify immediate value parsing
authorPhil Sutter <phil@nwl.cc>
Mon, 28 May 2018 16:51:06 +0000 (18:51 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 1 Jun 2018 07:16:48 +0000 (09:16 +0200)
commitd09eaf0fc19ca3664f535bf64c3f94e05fb7323d
treeed3b9bb5eff92008e8cfb0e892e797e39659f745
parent77e611b63ba958e79eec56d1cd1f18b64f938314
JSON: Simplify immediate value parsing

Since an explicit "immediate" expression doesn't exist in JSON (the
values are represented as plain JSON string/integer/boolean types),
there is no need for json_parse_immediate_expr() to comply to the common
expression parser parameter format.

Apart from that:

* Drop CTX_F_RHS checks - caller assures sane context already.
* Improve error message a bit for denied JSON types.

Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/parser_json.c