Skip to contentSkip to conversation

doc: libnftables-json: make the example valid JSON

PATCH In review Štěpán Němec 2 participants 3 messages Oct 11, 2021 netfilter

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 doc: libnftables-json: make the example valid JSON

Add missing comma between array elements.

Fixes 2e56f533b36a ("doc: Improve example in libnftables-json(5)")
---
 doc/libnftables-json.adoc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
doc/libnftables-json.adoc +1 -1
index c152dc055b50..f67de33482a9 100644
@@ -92,7 +92,7 @@ translates into JSON as such:
 			"family": "inet",
 			"table": "mytable",
 			"chain": "mychain"
-	}}}
+	}}},
 	{ "add": { "rule": {
 			"family": "inet",
 			"table": "mytable",

base-commit: 6bcd0d576a60d8a681cc6dd78551633f09534260

Signature · 1 line
2.33.0
#1 lore raw

PATCH 2/2 doc: libnftables-json: make the example valid libnftables JSON input

Fixes 2e56f533b36a ("doc: Improve example in libnftables-json(5)")
Fixes 90d4ee087171 ("JSON: Make match op mandatory, introduce 'in' operator")
---
 doc/libnftables-json.adoc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
doc/libnftables-json.adoc +2 -1
index f67de33482a9..9cc17ff26306 100644
@@ -91,7 +91,7 @@ translates into JSON as such:
 	{ "add": { "chain": {
 			"family": "inet",
 			"table": "mytable",
-			"chain": "mychain"
+			"name": "mychain"
 	}}},
 	{ "add": { "rule": {
 			"family": "inet",
@@ -99,6 +99,7 @@ translates into JSON as such:
 			"chain": "mychain",
 			"expr": [
 				{ "match": {
+					"op": "==",
 					"left": { "payload": {
 							"protocol": "tcp",
 							"field": "dport"
Signature · 1 line
2.33.0
reviewer
#2 lore raw
In reply to Štěpán Němec

Hi Štěpán,

Quoted 1 line · Štěpán Němec

Add missing comma between array elements.

Applied (after folding the two commits into one), thanks!

Cheers, Phil