From ad5669a40381e8cc30c459c1a06a6f736677dfc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0t=C4=9Bp=C3=A1n=20N=C4=9Bmec?= Date: Mon, 11 Oct 2021 13:59:04 +0200 Subject: doc: libnftables-json: make the example valid libnftables JSON input MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- doc/libnftables-json.adoc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'doc') 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" -- cgit v1.2.3