]> git.ipfire.org Git - thirdparty/nftables.git/commit
parser_json: permit empty device list
authorFlorian Westphal <fw@strlen.de>
Mon, 7 Feb 2022 13:09:28 +0000 (14:09 +0100)
committerFlorian Westphal <fw@strlen.de>
Mon, 7 Feb 2022 13:56:26 +0000 (14:56 +0100)
commitda6cb40177dae41fb7b4a3418dd728fd6f894f2d
tree31d25e96cfad7bdf79d5ad5d249516abd3dc4949
parentc6a5e81c2123c9ee61be152ab620e7e74f5a75ef
parser_json: permit empty device list

Normal input parser allows flowtables without 'devices' token, which
makes the json export part elide 'dev' entirely, this then breaks on
re-import:

$ nft -j -f json.dump
/tmp/json_1:1:14-14: Error: Object item not found: dev

Signed-off-by: Florian Westphal <fw@strlen.de>
src/parser_json.c