diff options
author | Phil Sutter <phil@nwl.cc> | 2018-08-29 16:23:22 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2018-08-30 12:19:36 +0200 |
commit | 2a4a5a2c8ae21f2bcf7e81b5eafea91d799ee88a (patch) | |
tree | 6dc5e3d0c196c6ec2bff0d22367c0875bdb32f92 /tests/py/ip | |
parent | 0ab82a84ddd25f742f18c1becbf78a74fcec2dce (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/ip')
-rw-r--r-- | tests/py/ip/dnat.t.json | 12 | ||||
-rw-r--r-- | tests/py/ip/ether.t.json | 2 | ||||
-rw-r--r-- | tests/py/ip/ip.t.json | 18 | ||||
-rw-r--r-- | tests/py/ip/ip.t.json.output | 2 | ||||
-rw-r--r-- | tests/py/ip/ip_tcp.t.json | 2 | ||||
-rw-r--r-- | tests/py/ip/ip_tcp.t.json.output | 2 | ||||
-rw-r--r-- | tests/py/ip/masquerade.t.json | 2 | ||||
-rw-r--r-- | tests/py/ip/meta.t.json | 6 | ||||
-rw-r--r-- | tests/py/ip/redirect.t.json | 2 | ||||
-rw-r--r-- | tests/py/ip/reject.t.json | 2 | ||||
-rw-r--r-- | tests/py/ip/reject.t.json.output | 2 | ||||
-rw-r--r-- | tests/py/ip/snat.t.json | 10 | ||||
-rw-r--r-- | tests/py/ip/snat.t.json.output | 4 |
13 files changed, 33 insertions, 33 deletions
diff --git a/tests/py/ip/dnat.t.json b/tests/py/ip/dnat.t.json index 56f8272f..f0140305 100644 --- a/tests/py/ip/dnat.t.json +++ b/tests/py/ip/dnat.t.json @@ -3,7 +3,7 @@ { "match": { "left": { - "meta": "iifname" + "meta": { "key": "iifname" } }, "right": "eth0" } @@ -33,7 +33,7 @@ { "match": { "left": { - "meta": "iifname" + "meta": { "key": "iifname" } }, "right": "eth0" } @@ -64,7 +64,7 @@ { "match": { "left": { - "meta": "iifname" + "meta": { "key": "iifname" } }, "right": "eth0" } @@ -98,7 +98,7 @@ { "match": { "left": { - "meta": "iifname" + "meta": { "key": "iifname" } }, "right": "eth0" } @@ -133,7 +133,7 @@ { "match": { "left": { - "meta": "iifname" + "meta": { "key": "iifname" } }, "right": "eth0" } @@ -164,7 +164,7 @@ { "match": { "left": { - "meta": "iifname" + "meta": { "key": "iifname" } }, "right": "eth0" } diff --git a/tests/py/ip/ether.t.json b/tests/py/ip/ether.t.json index 022ae0b5..f176bf7e 100644 --- a/tests/py/ip/ether.t.json +++ b/tests/py/ip/ether.t.json @@ -14,7 +14,7 @@ { "match": { "left": { - "meta": "iiftype" + "meta": { "key": "iiftype" } }, "right": "ether" } diff --git a/tests/py/ip/ip.t.json b/tests/py/ip/ip.t.json index d66e4264..a6b53571 100644 --- a/tests/py/ip/ip.t.json +++ b/tests/py/ip/ip.t.json @@ -1577,7 +1577,7 @@ { "match": { "left": { - "meta": "iif" + "meta": { "key": "iif" } }, "right": "lo" } @@ -1600,7 +1600,7 @@ { "match": { "left": { - "meta": "iif" + "meta": { "key": "iif" } }, "right": "lo" } @@ -1623,7 +1623,7 @@ { "match": { "left": { - "meta": "iif" + "meta": { "key": "iif" } }, "right": "lo" } @@ -1646,7 +1646,7 @@ { "match": { "left": { - "meta": "iif" + "meta": { "key": "iif" } }, "right": "lo" } @@ -1669,7 +1669,7 @@ { "match": { "left": { - "meta": "iif" + "meta": { "key": "iif" } }, "right": "lo" } @@ -1692,7 +1692,7 @@ { "match": { "left": { - "meta": "iif" + "meta": { "key": "iif" } }, "right": "lo" } @@ -1715,7 +1715,7 @@ { "match": { "left": { - "meta": "iif" + "meta": { "key": "iif" } }, "right": "lo" } @@ -1738,7 +1738,7 @@ { "match": { "left": { - "meta": "iif" + "meta": { "key": "iif" } }, "right": "lo" } @@ -1761,7 +1761,7 @@ { "match": { "left": { - "meta": "iif" + "meta": { "key": "iif" } }, "right": "lo" } diff --git a/tests/py/ip/ip.t.json.output b/tests/py/ip/ip.t.json.output index 21143089..967e2a59 100644 --- a/tests/py/ip/ip.t.json.output +++ b/tests/py/ip/ip.t.json.output @@ -206,7 +206,7 @@ { "match": { "left": { - "meta": "iif" + "meta": { "key": "iif" } }, "right": "lo" } diff --git a/tests/py/ip/ip_tcp.t.json b/tests/py/ip/ip_tcp.t.json index 82b7cdcc..9fd3339c 100644 --- a/tests/py/ip/ip_tcp.t.json +++ b/tests/py/ip/ip_tcp.t.json @@ -40,7 +40,7 @@ { "mangle": { "left": { - "meta": "mark" + "meta": { "key": "mark" } }, "right": 1 } diff --git a/tests/py/ip/ip_tcp.t.json.output b/tests/py/ip/ip_tcp.t.json.output index bbc318a7..90828814 100644 --- a/tests/py/ip/ip_tcp.t.json.output +++ b/tests/py/ip/ip_tcp.t.json.output @@ -29,7 +29,7 @@ { "mangle": { "left": { - "meta": "mark" + "meta": { "key": "mark" } }, "right": 1 } diff --git a/tests/py/ip/masquerade.t.json b/tests/py/ip/masquerade.t.json index 4eae3b98..f2f798fe 100644 --- a/tests/py/ip/masquerade.t.json +++ b/tests/py/ip/masquerade.t.json @@ -360,7 +360,7 @@ { "match": { "left": { - "meta": "iifname" + "meta": { "key": "iifname" } }, "right": "eth0" } diff --git a/tests/py/ip/meta.t.json b/tests/py/ip/meta.t.json index e538b748..c06e48ff 100644 --- a/tests/py/ip/meta.t.json +++ b/tests/py/ip/meta.t.json @@ -18,7 +18,7 @@ { "match": { "left": { - "meta": "l4proto" + "meta": { "key": "l4proto" } }, "right": "icmp" } @@ -41,7 +41,7 @@ { "match": { "left": { - "meta": "l4proto" + "meta": { "key": "l4proto" } }, "right": "ipv6-icmp" } @@ -64,7 +64,7 @@ { "match": { "left": { - "meta": "l4proto" + "meta": { "key": "l4proto" } }, "right": 58 } diff --git a/tests/py/ip/redirect.t.json b/tests/py/ip/redirect.t.json index 58e78ee9..4a41489b 100644 --- a/tests/py/ip/redirect.t.json +++ b/tests/py/ip/redirect.t.json @@ -518,7 +518,7 @@ { "match": { "left": { - "meta": "iifname" + "meta": { "key": "iifname" } }, "right": "eth0" } diff --git a/tests/py/ip/reject.t.json b/tests/py/ip/reject.t.json index e0b8e2b2..e1886fa3 100644 --- a/tests/py/ip/reject.t.json +++ b/tests/py/ip/reject.t.json @@ -80,7 +80,7 @@ { "match": { "left": { - "meta": "mark" + "meta": { "key": "mark" } }, "right": "0x80000000" } diff --git a/tests/py/ip/reject.t.json.output b/tests/py/ip/reject.t.json.output index 099320c6..6829792c 100644 --- a/tests/py/ip/reject.t.json.output +++ b/tests/py/ip/reject.t.json.output @@ -10,7 +10,7 @@ { "match": { "left": { - "meta": "mark" + "meta": { "key": "mark" } }, "right": 2147483648 } diff --git a/tests/py/ip/snat.t.json b/tests/py/ip/snat.t.json index b925b6c7..1bf54f40 100644 --- a/tests/py/ip/snat.t.json +++ b/tests/py/ip/snat.t.json @@ -3,7 +3,7 @@ { "match": { "left": { - "meta": "iifname" + "meta": { "key": "iifname" } }, "right": "eth0" } @@ -33,7 +33,7 @@ { "match": { "left": { - "meta": "iifname" + "meta": { "key": "iifname" } }, "right": "eth0" } @@ -64,7 +64,7 @@ { "match": { "left": { - "meta": "iifname" + "meta": { "key": "iifname" } }, "right": "eth0" } @@ -98,7 +98,7 @@ { "match": { "left": { - "meta": "iifname" + "meta": { "key": "iifname" } }, "right": "eth0" } @@ -133,7 +133,7 @@ { "match": { "left": { - "meta": "iifname" + "meta": { "key": "iifname" } }, "right": "eth0" } diff --git a/tests/py/ip/snat.t.json.output b/tests/py/ip/snat.t.json.output index 4446ae66..f27c25dc 100644 --- a/tests/py/ip/snat.t.json.output +++ b/tests/py/ip/snat.t.json.output @@ -3,7 +3,7 @@ { "match": { "left": { - "meta": "iifname" + "meta": { "key": "iifname" } }, "right": "eth0" } @@ -37,7 +37,7 @@ { "match": { "left": { - "meta": "iifname" + "meta": { "key": "iifname" } }, "right": "eth0" } |