summaryrefslogtreecommitdiffstats
path: root/tests/py/inet
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2018-08-29 16:23:22 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2018-08-30 12:19:36 +0200
commit2a4a5a2c8ae21f2bcf7e81b5eafea91d799ee88a (patch)
tree6dc5e3d0c196c6ec2bff0d22367c0875bdb32f92 /tests/py/inet
parent0ab82a84ddd25f742f18c1becbf78a74fcec2dce (diff)
JSON: Make meta statement/expression extensible
Lessons learned from fwd statement: We must not assume a given statement/expression may not receive further properties in the future. Therefore make meta value an object with a property "key" instead of just a string containing the key name. Signed-off-by: Phil Sutter <phil@nwl.cc> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/py/inet')
-rw-r--r--tests/py/inet/ct.t.json2
-rw-r--r--tests/py/inet/ether-ip.t.json2
-rw-r--r--tests/py/inet/ether.t.json2
-rw-r--r--tests/py/inet/icmp.t.json8
-rw-r--r--tests/py/inet/icmpX.t.json2
-rw-r--r--tests/py/inet/icmpX.t.json.output2
-rw-r--r--tests/py/inet/map.t.json4
-rw-r--r--tests/py/inet/map.t.json.output4
-rw-r--r--tests/py/inet/meta.t.json24
-rw-r--r--tests/py/inet/meta.t.json.output4
-rw-r--r--tests/py/inet/reject.t.json10
-rw-r--r--tests/py/inet/reject.t.json.output26
-rw-r--r--tests/py/inet/rt.t.json2
-rw-r--r--tests/py/inet/rt.t.json.output2
-rw-r--r--tests/py/inet/udp.t.json4
15 files changed, 49 insertions, 49 deletions
diff --git a/tests/py/inet/ct.t.json b/tests/py/inet/ct.t.json
index 686c43f4..9b54e1d0 100644
--- a/tests/py/inet/ct.t.json
+++ b/tests/py/inet/ct.t.json
@@ -3,7 +3,7 @@
{
"match": {
"left": {
- "meta": "nfproto"
+ "meta": { "key": "nfproto" }
},
"right": "ipv4"
}
diff --git a/tests/py/inet/ether-ip.t.json b/tests/py/inet/ether-ip.t.json
index 0c0964e6..accb9d69 100644
--- a/tests/py/inet/ether-ip.t.json
+++ b/tests/py/inet/ether-ip.t.json
@@ -14,7 +14,7 @@
{
"match": {
"left": {
- "meta": "iiftype"
+ "meta": { "key": "iiftype" }
},
"right": "ether"
}
diff --git a/tests/py/inet/ether.t.json b/tests/py/inet/ether.t.json
index 0daf46e9..b5042adb 100644
--- a/tests/py/inet/ether.t.json
+++ b/tests/py/inet/ether.t.json
@@ -14,7 +14,7 @@
{
"match": {
"left": {
- "meta": "iiftype"
+ "meta": { "key": "iiftype" }
},
"right": "ether"
}
diff --git a/tests/py/inet/icmp.t.json b/tests/py/inet/icmp.t.json
index c4517605..55217cc9 100644
--- a/tests/py/inet/icmp.t.json
+++ b/tests/py/inet/icmp.t.json
@@ -32,7 +32,7 @@
[
{
"match": {
- "left": { "meta": "nfproto" },
+ "left": { "meta": { "key": "nfproto" } },
"right": "ipv4"
}
},
@@ -53,7 +53,7 @@
[
{
"match": {
- "left": { "meta": "nfproto" },
+ "left": { "meta": { "key": "nfproto" } },
"right": "ipv4"
}
},
@@ -74,7 +74,7 @@
[
{
"match": {
- "left": { "meta": "nfproto" },
+ "left": { "meta": { "key": "nfproto" } },
"right": "ipv6"
}
},
@@ -95,7 +95,7 @@
[
{
"match": {
- "left": { "meta": "nfproto" },
+ "left": { "meta": { "key": "nfproto" } },
"right": "ipv6"
}
},
diff --git a/tests/py/inet/icmpX.t.json b/tests/py/inet/icmpX.t.json
index 006419e3..23ee7ed8 100644
--- a/tests/py/inet/icmpX.t.json
+++ b/tests/py/inet/icmpX.t.json
@@ -96,7 +96,7 @@
{
"match": {
"left": {
- "meta": "l4proto"
+ "meta": { "key": "l4proto" }
},
"right": "ipv6-icmp"
}
diff --git a/tests/py/inet/icmpX.t.json.output b/tests/py/inet/icmpX.t.json.output
index 94034388..55158fee 100644
--- a/tests/py/inet/icmpX.t.json.output
+++ b/tests/py/inet/icmpX.t.json.output
@@ -66,7 +66,7 @@
{
"match": {
"left": {
- "meta": "l4proto"
+ "meta": { "key": "l4proto" }
},
"right": 58
}
diff --git a/tests/py/inet/map.t.json b/tests/py/inet/map.t.json
index b7bb10a9..bb7f2a05 100644
--- a/tests/py/inet/map.t.json
+++ b/tests/py/inet/map.t.json
@@ -3,7 +3,7 @@
{
"mangle": {
"left": {
- "meta": "mark"
+ "meta": { "key": "mark" }
},
"right": {
"map": {
@@ -36,7 +36,7 @@
{
"mangle": {
"left": {
- "meta": "mark"
+ "meta": { "key": "mark" }
},
"right": {
"map": {
diff --git a/tests/py/inet/map.t.json.output b/tests/py/inet/map.t.json.output
index 5a410b3b..74c9b4f6 100644
--- a/tests/py/inet/map.t.json.output
+++ b/tests/py/inet/map.t.json.output
@@ -3,7 +3,7 @@
{
"mangle": {
"left": {
- "meta": "mark"
+ "meta": { "key": "mark" }
},
"right": {
"map": {
@@ -36,7 +36,7 @@
{
"mangle": {
"left": {
- "meta": "mark"
+ "meta": { "key": "mark" }
},
"right": {
"map": {
diff --git a/tests/py/inet/meta.t.json b/tests/py/inet/meta.t.json
index 2687f69e..6c5f4567 100644
--- a/tests/py/inet/meta.t.json
+++ b/tests/py/inet/meta.t.json
@@ -3,7 +3,7 @@
{
"match": {
"left": {
- "meta": "nfproto"
+ "meta": { "key": "nfproto" }
},
"right": "ipv4"
}
@@ -15,7 +15,7 @@
{
"match": {
"left": {
- "meta": "nfproto"
+ "meta": { "key": "nfproto" }
},
"right": "ipv6"
}
@@ -27,7 +27,7 @@
{
"match": {
"left": {
- "meta": "nfproto"
+ "meta": { "key": "nfproto" }
},
"right": {
"set": [
@@ -44,7 +44,7 @@
{
"match": {
"left": {
- "meta": "nfproto"
+ "meta": { "key": "nfproto" }
},
"op": "!=",
"right": {
@@ -62,7 +62,7 @@
{
"match": {
"left": {
- "meta": "nfproto"
+ "meta": { "key": "nfproto" }
},
"right": "ipv6"
}
@@ -85,7 +85,7 @@
{
"match": {
"left": {
- "meta": "nfproto"
+ "meta": { "key": "nfproto" }
},
"right": "ipv4"
}
@@ -108,7 +108,7 @@
{
"match": {
"left": {
- "meta": "nfproto"
+ "meta": { "key": "nfproto" }
},
"right": "ipv4"
}
@@ -131,7 +131,7 @@
{
"match": {
"left": {
- "meta": "nfproto"
+ "meta": { "key": "nfproto" }
},
"right": "ipv6"
}
@@ -139,7 +139,7 @@
{
"match": {
"left": {
- "meta": "l4proto"
+ "meta": { "key": "l4proto" }
},
"right": "tcp"
}
@@ -151,7 +151,7 @@
{
"match": {
"left": {
- "meta": "nfproto"
+ "meta": { "key": "nfproto" }
},
"right": "ipv4"
}
@@ -177,7 +177,7 @@
{
"match": {
"left": {
- "meta": "secpath"
+ "meta": { "key": "secpath" }
},
"right": true
}
@@ -189,7 +189,7 @@
{
"match": {
"left": {
- "meta": "secpath"
+ "meta": { "key": "secpath" }
},
"right": false
}
diff --git a/tests/py/inet/meta.t.json.output b/tests/py/inet/meta.t.json.output
index 19b2d262..0dc3371f 100644
--- a/tests/py/inet/meta.t.json.output
+++ b/tests/py/inet/meta.t.json.output
@@ -18,7 +18,7 @@
{
"match": {
"left": {
- "meta": "nfproto"
+ "meta": { "key": "nfproto" }
},
"right": "ipv6"
}
@@ -26,7 +26,7 @@
{
"match": {
"left": {
- "meta": "l4proto"
+ "meta": { "key": "l4proto" }
},
"right": 6
}
diff --git a/tests/py/inet/reject.t.json b/tests/py/inet/reject.t.json
index 46d4857a..b63cb7df 100644
--- a/tests/py/inet/reject.t.json
+++ b/tests/py/inet/reject.t.json
@@ -113,7 +113,7 @@
{
"match": {
"left": {
- "meta": "mark"
+ "meta": { "key": "mark" }
},
"right": 12345
}
@@ -137,7 +137,7 @@
{
"match": {
"left": {
- "meta": "nfproto"
+ "meta": { "key": "nfproto" }
},
"right": "ipv4"
}
@@ -152,7 +152,7 @@
{
"match": {
"left": {
- "meta": "nfproto"
+ "meta": { "key": "nfproto" }
},
"right": "ipv6"
}
@@ -207,7 +207,7 @@
{
"match": {
"left": {
- "meta": "nfproto"
+ "meta": { "key": "nfproto" }
},
"right": "ipv4"
}
@@ -225,7 +225,7 @@
{
"match": {
"left": {
- "meta": "nfproto"
+ "meta": { "key": "nfproto" }
},
"right": "ipv6"
}
diff --git a/tests/py/inet/reject.t.json.output b/tests/py/inet/reject.t.json.output
index b1e77990..46875434 100644
--- a/tests/py/inet/reject.t.json.output
+++ b/tests/py/inet/reject.t.json.output
@@ -3,7 +3,7 @@
{
"match": {
"left": {
- "meta": "nfproto"
+ "meta": { "key": "nfproto" }
},
"right": "ipv4"
}
@@ -21,7 +21,7 @@
{
"match": {
"left": {
- "meta": "nfproto"
+ "meta": { "key": "nfproto" }
},
"right": "ipv4"
}
@@ -39,7 +39,7 @@
{
"match": {
"left": {
- "meta": "nfproto"
+ "meta": { "key": "nfproto" }
},
"right": "ipv4"
}
@@ -57,7 +57,7 @@
{
"match": {
"left": {
- "meta": "nfproto"
+ "meta": { "key": "nfproto" }
},
"right": "ipv4"
}
@@ -72,7 +72,7 @@
{
"match": {
"left": {
- "meta": "nfproto"
+ "meta": { "key": "nfproto" }
},
"right": "ipv4"
}
@@ -90,7 +90,7 @@
{
"match": {
"left": {
- "meta": "nfproto"
+ "meta": { "key": "nfproto" }
},
"right": "ipv4"
}
@@ -108,7 +108,7 @@
{
"match": {
"left": {
- "meta": "nfproto"
+ "meta": { "key": "nfproto" }
},
"right": "ipv4"
}
@@ -126,7 +126,7 @@
{
"match": {
"left": {
- "meta": "nfproto"
+ "meta": { "key": "nfproto" }
},
"right": "ipv6"
}
@@ -144,7 +144,7 @@
{
"match": {
"left": {
- "meta": "nfproto"
+ "meta": { "key": "nfproto" }
},
"right": "ipv6"
}
@@ -162,7 +162,7 @@
{
"match": {
"left": {
- "meta": "nfproto"
+ "meta": { "key": "nfproto" }
},
"right": "ipv6"
}
@@ -180,7 +180,7 @@
{
"match": {
"left": {
- "meta": "nfproto"
+ "meta": { "key": "nfproto" }
},
"right": "ipv6"
}
@@ -195,7 +195,7 @@
{
"match": {
"left": {
- "meta": "l4proto"
+ "meta": { "key": "l4proto" }
},
"right": 6
}
@@ -203,7 +203,7 @@
{
"match": {
"left": {
- "meta": "mark"
+ "meta": { "key": "mark" }
},
"right": 12345
}
diff --git a/tests/py/inet/rt.t.json b/tests/py/inet/rt.t.json
index 32e1d437..92f2dbea 100644
--- a/tests/py/inet/rt.t.json
+++ b/tests/py/inet/rt.t.json
@@ -3,7 +3,7 @@
{
"match": {
"left": {
- "meta": "nfproto"
+ "meta": { "key": "nfproto" }
},
"right": "ipv4"
}
diff --git a/tests/py/inet/rt.t.json.output b/tests/py/inet/rt.t.json.output
index 1d3ecac1..de765bd9 100644
--- a/tests/py/inet/rt.t.json.output
+++ b/tests/py/inet/rt.t.json.output
@@ -3,7 +3,7 @@
{
"match": {
"left": {
- "meta": "nfproto"
+ "meta": { "key": "nfproto" }
},
"right": "ipv4"
}
diff --git a/tests/py/inet/udp.t.json b/tests/py/inet/udp.t.json
index d760fb75..096fe559 100644
--- a/tests/py/inet/udp.t.json
+++ b/tests/py/inet/udp.t.json
@@ -687,7 +687,7 @@
{
"match": {
"left": {
- "meta": "iif"
+ "meta": { "key": "iif" }
},
"right": "lo"
}
@@ -710,7 +710,7 @@
{
"match": {
"left": {
- "meta": "iif"
+ "meta": { "key": "iif" }
},
"right": "lo"
}