]> git.ipfire.org Git - thirdparty/nftables.git/commit
src: Reject 'export vm json' command
authorPhil Sutter <phil@nwl.cc>
Mon, 17 Dec 2018 15:29:56 +0000 (16:29 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 21 Dec 2018 00:35:54 +0000 (01:35 +0100)
commit8d51f169e0e832a41d2ed278be903c08bd4fa473
treee53044907bdd144a2948dba52cd65f83ab183c2e
parent9e84f3f083bb33f4de974fd87a5d06fb9609be12
src: Reject 'export vm json' command

Since libnftnl recently dropped JSON output support, this form of JSON
export is not available anymore. Point at 'nft -j list ruleset' command
for a replacement in error message.

Since 'export' command is not useable anymore, remove it from
documentation. Instead point out that 'list ruleset' command serves well
for dumping and later restoring.

To not cause pointless inconvenience for users wishing to store their
ruleset in JSON format, make JSON parser fallback to CMD_ADD if no
recognized command property was found. This allows to feed the output of
'nft -j list ruleset' into 'nft -f' without any modification.

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