From 90d4ee087171e75d5313359ad6b6f1341e51ddc5 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Wed, 29 Aug 2018 16:23:27 +0200 Subject: 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 Signed-off-by: Pablo Neira Ayuso --- tests/py/inet/tcp.t.json | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) (limited to 'tests/py/inet/tcp.t.json') diff --git a/tests/py/inet/tcp.t.json b/tests/py/inet/tcp.t.json index 0b30fbcf..5744e594 100644 --- a/tests/py/inet/tcp.t.json +++ b/tests/py/inet/tcp.t.json @@ -8,6 +8,7 @@ "protocol": "tcp" } }, + "op": "==", "right": 22 } } @@ -39,6 +40,7 @@ "protocol": "tcp" } }, + "op": "==", "right": { "range": [ 33, 45 ] } @@ -74,6 +76,7 @@ "protocol": "tcp" } }, + "op": "==", "right": { "set": [ 33, @@ -119,6 +122,7 @@ "protocol": "tcp" } }, + "op": "==", "right": { "set": [ { "range": [ 33, 55 ] } @@ -158,6 +162,7 @@ "protocol": "tcp" } }, + "op": "==", "right": { "set": [ "telnet", @@ -242,6 +247,7 @@ "protocol": "tcp" } }, + "op": "==", "right": { "set": [ 22, @@ -287,6 +293,7 @@ "protocol": "tcp" } }, + "op": "==", "right": 22 } } @@ -318,6 +325,7 @@ "protocol": "tcp" } }, + "op": "==", "right": { "range": [ 33, 45 ] } @@ -353,6 +361,7 @@ "protocol": "tcp" } }, + "op": "==", "right": { "set": [ 33, @@ -398,6 +407,7 @@ "protocol": "tcp" } }, + "op": "==", "right": { "set": [ { "range": [ 33, 55 ] } @@ -467,6 +477,7 @@ "protocol": "tcp" } }, + "op": "==", "right": 8080 } }, @@ -485,6 +496,7 @@ "protocol": "tcp" } }, + "op": "==", "right": 1024 } }, @@ -496,6 +508,7 @@ "protocol": "tcp" } }, + "op": "==", "right": 22 } } @@ -511,6 +524,7 @@ "protocol": "tcp" } }, + "op": "==", "right": 1024 } }, @@ -522,6 +536,7 @@ "protocol": "tcp" } }, + "op": "==", "right": 22 } }, @@ -533,6 +548,7 @@ "protocol": "tcp" } }, + "op": "==", "right": 0 } } @@ -548,6 +564,7 @@ "protocol": "tcp" } }, + "op": "==", "right": 0 } }, @@ -559,6 +576,7 @@ "protocol": "tcp" } }, + "op": "==", "right": 1024 } }, @@ -570,6 +588,7 @@ "protocol": "tcp" } }, + "op": "==", "right": 22 } } @@ -585,6 +604,7 @@ "protocol": "tcp" } }, + "op": "==", "right": 0 } }, @@ -596,6 +616,7 @@ "protocol": "tcp" } }, + "op": "==", "right": { "set": [ 1024, @@ -612,6 +633,7 @@ "protocol": "tcp" } }, + "op": "==", "right": 22 } } @@ -627,6 +649,7 @@ "protocol": "tcp" } }, + "op": "==", "right": 22 } } @@ -658,6 +681,7 @@ "protocol": "tcp" } }, + "op": "==", "right": { "range": [ 33, 45 ] } @@ -693,6 +717,7 @@ "protocol": "tcp" } }, + "op": "==", "right": { "set": [ 33, @@ -738,6 +763,7 @@ "protocol": "tcp" } }, + "op": "==", "right": { "set": [ { "range": [ 33, 55 ] } @@ -777,6 +803,7 @@ "protocol": "tcp" } }, + "op": "==", "right": 42949672 } }, @@ -795,6 +822,7 @@ "protocol": "tcp" } }, + "op": "==", "right": 22 } } @@ -826,6 +854,7 @@ "protocol": "tcp" } }, + "op": "==", "right": { "range": [ 33, 45 ] } @@ -861,6 +890,7 @@ "protocol": "tcp" } }, + "op": "==", "right": { "set": [ 33, @@ -906,6 +936,7 @@ "protocol": "tcp" } }, + "op": "==", "right": { "set": [ { "range": [ 33, 55 ] } @@ -945,6 +976,7 @@ "protocol": "tcp" } }, + "op": "==", "right": { "set": [ "fin", @@ -1000,6 +1032,7 @@ "protocol": "tcp" } }, + "op": "in", "right": "cwr" } } @@ -1078,6 +1111,7 @@ "protocol": "tcp" } }, + "op": "==", "right": 22222 } } @@ -1093,6 +1127,7 @@ "protocol": "tcp" } }, + "op": "==", "right": 22 } } @@ -1124,6 +1159,7 @@ "protocol": "tcp" } }, + "op": "==", "right": { "range": [ 33, 45 ] } @@ -1159,6 +1195,7 @@ "protocol": "tcp" } }, + "op": "==", "right": { "set": [ 33, @@ -1204,6 +1241,7 @@ "protocol": "tcp" } }, + "op": "==", "right": { "set": [ { "range": [ 33, 55 ] } @@ -1243,6 +1281,7 @@ "protocol": "tcp" } }, + "op": "==", "right": 22 } } @@ -1274,6 +1313,7 @@ "protocol": "tcp" } }, + "op": "==", "right": { "range": [ 33, 45 ] } @@ -1309,6 +1349,7 @@ "protocol": "tcp" } }, + "op": "==", "right": { "set": [ 33, @@ -1354,6 +1395,7 @@ "protocol": "tcp" } }, + "op": "==", "right": { "set": [ { "range": [ 33, 55 ] } @@ -1393,6 +1435,7 @@ "protocol": "tcp" } }, + "op": "==", "right": 1234 } }, @@ -1411,6 +1454,7 @@ "protocol": "tcp" } }, + "op": "==", "right": 22 } } @@ -1442,6 +1486,7 @@ "protocol": "tcp" } }, + "op": "==", "right": { "range": [ 33, 45 ] } @@ -1477,6 +1522,7 @@ "protocol": "tcp" } }, + "op": "==", "right": { "set": [ 33, @@ -1522,6 +1568,7 @@ "protocol": "tcp" } }, + "op": "==", "right": { "set": [ { "range": [ 33, 55 ] } @@ -1561,6 +1608,7 @@ "protocol": "tcp" } }, + "op": "==", "right": 8 } } -- cgit v1.2.3