From: Štěpán Němec Date: Mon, 11 Oct 2021 11:59:04 +0000 (+0200) Subject: doc: libnftables-json: make the example valid libnftables JSON input X-Git-Tag: v1.0.1~45 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=ad5669a40381e8cc30c459c1a06a6f736677dfc6;p=thirdparty%2Fnftables.git doc: libnftables-json: make the example valid libnftables JSON input - Add missing comma between array elements. - Fix chain 'name' property. - Match 'op' property is mandatory. Fixes: 2e56f533b36a ("doc: Improve example in libnftables-json(5)") Fixes: 90d4ee087171 ("JSON: Make match op mandatory, introduce 'in' operator") Signed-off-by: Štěpán Němec Signed-off-by: Phil Sutter --- diff --git a/doc/libnftables-json.adoc b/doc/libnftables-json.adoc index c152dc05..9cc17ff2 100644 --- a/doc/libnftables-json.adoc +++ b/doc/libnftables-json.adoc @@ -91,14 +91,15 @@ translates into JSON as such: { "add": { "chain": { "family": "inet", "table": "mytable", - "chain": "mychain" - }}} + "name": "mychain" + }}}, { "add": { "rule": { "family": "inet", "table": "mytable", "chain": "mychain", "expr": [ { "match": { + "op": "==", "left": { "payload": { "protocol": "tcp", "field": "dport"