diff options
author | Phil Sutter <phil@nwl.cc> | 2018-08-29 16:23:27 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2018-08-30 12:19:36 +0200 |
commit | 90d4ee087171e75d5313359ad6b6f1341e51ddc5 (patch) | |
tree | 59572c39aa334813b9b090fa46a57fedf9ff5aac /tests/py/any/ct.t.json | |
parent | 8f6e1c37e3e74e1fd490a0de5360ff1467c521cd (diff) |
JSON: Make match op mandatory, introduce 'in' operator
This special operator is required for cases where missing operator does
not lead to same results as equal operator, i.e. with bitmasks on RHS.
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/py/any/ct.t.json')
-rw-r--r-- | tests/py/any/ct.t.json | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/py/any/ct.t.json b/tests/py/any/ct.t.json index 2fb4e727..45e48f22 100644 --- a/tests/py/any/ct.t.json +++ b/tests/py/any/ct.t.json @@ -7,6 +7,7 @@ "key": "state" } }, + "op": "in", "right": [ "new", "established", @@ -41,6 +42,7 @@ "key": "state" } }, + "op": "in", "right": { "set": [ "new", @@ -84,6 +86,7 @@ "key": "state" } }, + "op": "in", "right": "invalid" } }, @@ -101,6 +104,7 @@ "key": "state" } }, + "op": "in", "right": "established" } }, @@ -118,6 +122,7 @@ "key": "state" } }, + "op": "in", "right": 8 } } @@ -132,6 +137,7 @@ "key": "direction" } }, + "op": "==", "right": "original" } } @@ -161,6 +167,7 @@ "key": "direction" } }, + "op": "==", "right": "reply" } } @@ -190,6 +197,7 @@ "key": "direction" } }, + "op": "in", "right": { "set": [ "reply", @@ -229,6 +237,7 @@ "key": "status" } }, + "op": "in", "right": "expected" } } @@ -258,6 +267,7 @@ "key": "status" } }, + "op": "in", "right": "seen-reply" } } @@ -287,6 +297,7 @@ "key": "status" } }, + "op": "==", "right": { "set": [ "expected", @@ -309,6 +320,7 @@ "key": "status" } }, + "op": "in", "right": [ "expected", "seen-reply", @@ -331,6 +343,7 @@ "key": "status" } }, + "op": "in", "right": "snat" } } @@ -345,6 +358,7 @@ "key": "status" } }, + "op": "in", "right": "dnat" } } @@ -359,6 +373,7 @@ "key": "mark" } }, + "op": "==", "right": 0 } } @@ -458,6 +473,7 @@ "0x23" ] }, + "op": "==", "right": "0x11" } } @@ -492,6 +508,7 @@ "key": "mark" } }, + "op": "==", "right": "0x00000032" } } @@ -521,6 +538,7 @@ "key": "mark" } }, + "op": "==", "right": { "range": [ "0x00000032", "0x00000045" ] } @@ -554,6 +572,7 @@ "key": "mark" } }, + "op": "in", "right": { "set": [ "0x32", @@ -574,6 +593,7 @@ "key": "mark" } }, + "op": "in", "right": { "set": [ { @@ -717,6 +737,7 @@ "key": "expiration" } }, + "op": "==", "right": "30s" } } @@ -731,6 +752,7 @@ "key": "expiration" } }, + "op": "==", "right": "30000ms" } } @@ -745,6 +767,7 @@ "key": "expiration" } }, + "op": "==", "right": { "range": [ "1m", "1h" ] } @@ -791,6 +814,7 @@ "key": "expiration" } }, + "op": "==", "right": { "range": [ 33, 45 ] } @@ -824,6 +848,7 @@ "key": "expiration" } }, + "op": "==", "right": { "set": [ 33, @@ -867,6 +892,7 @@ "key": "expiration" } }, + "op": "==", "right": { "set": [ { @@ -908,6 +934,7 @@ "key": "helper" } }, + "op": "==", "right": "ftp" } } @@ -931,6 +958,7 @@ } ] }, + "op": "==", "right": { "set": [ { @@ -963,6 +991,7 @@ } ] }, + "op": "==", "right": { "set": [ { "concat": [ "new", "0x12345678" ] }, @@ -992,6 +1021,7 @@ } ] }, + "op": "==", "right": { "set": [ { @@ -1227,6 +1257,7 @@ "key": "label" } }, + "op": "in", "right": 127 } } @@ -1255,6 +1286,7 @@ "key": "zone" } }, + "op": "==", "right": 0 } } @@ -1269,6 +1301,7 @@ "key": "zone" } }, + "op": "==", "right": 23 } } @@ -1284,6 +1317,7 @@ "key": "zone" } }, + "op": "==", "right": 1 } } @@ -1299,6 +1333,7 @@ "key": "zone" } }, + "op": "==", "right": 1 } } |