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/ah.t.json | 15 +++++++++++ tests/py/inet/comp.t.json | 8 ++++++ tests/py/inet/comp.t.json.output | 4 +++ tests/py/inet/ct.t.json | 3 +++ tests/py/inet/ct.t.json.output | 1 + tests/py/inet/dccp.t.json | 10 ++++++++ tests/py/inet/dccp.t.json.output | 1 + tests/py/inet/esp.t.json | 8 ++++++ tests/py/inet/ether-ip.t.json | 7 ++++++ tests/py/inet/ether-ip.t.json.output | 3 +++ tests/py/inet/ether.t.json | 6 +++++ tests/py/inet/ether.t.json.output | 2 ++ tests/py/inet/fib.t.json | 4 +++ tests/py/inet/icmp.t.json | 10 ++++++++ tests/py/inet/icmp.t.json.output | 2 ++ tests/py/inet/icmpX.t.json | 9 +++++++ tests/py/inet/icmpX.t.json.output | 7 ++++++ tests/py/inet/ip.t.json | 1 + tests/py/inet/ip_tcp.t.json | 12 +++++++++ tests/py/inet/ip_tcp.t.json.output | 9 +++++++ tests/py/inet/meta.t.json | 15 +++++++++++ tests/py/inet/meta.t.json.output | 3 +++ tests/py/inet/reject.t.json | 5 ++++ tests/py/inet/reject.t.json.output | 13 ++++++++++ tests/py/inet/rt.t.json | 3 +++ tests/py/inet/rt.t.json.output | 2 ++ tests/py/inet/sctp.t.json | 16 ++++++++++++ tests/py/inet/sets.t.json | 1 + tests/py/inet/socket.t.json | 2 ++ tests/py/inet/tcp.t.json | 48 ++++++++++++++++++++++++++++++++++++ tests/py/inet/tcp.t.json.output | 7 ++++++ tests/py/inet/tcpopt.t.json | 27 ++++++++++++++++++++ tests/py/inet/tcpopt.t.json.output | 2 ++ tests/py/inet/udp.t.json | 19 ++++++++++++++ tests/py/inet/udplite.t.json | 13 ++++++++++ 35 files changed, 298 insertions(+) (limited to 'tests/py/inet') diff --git a/tests/py/inet/ah.t.json b/tests/py/inet/ah.t.json index 4f3fd743..4efdb0dd 100644 --- a/tests/py/inet/ah.t.json +++ b/tests/py/inet/ah.t.json @@ -8,6 +8,7 @@ "protocol": "ah" } }, + "op": "==", "right": { "range": [ 11, 23 ] } @@ -43,6 +44,7 @@ "protocol": "ah" } }, + "op": "==", "right": { "set": [ { "range": [ 11, 23 ] } @@ -82,6 +84,7 @@ "protocol": "ah" } }, + "op": "==", "right": { "set": [ 11, @@ -125,6 +128,7 @@ "protocol": "ah" } }, + "op": "==", "right": 22 } } @@ -156,6 +160,7 @@ "protocol": "ah" } }, + "op": "==", "right": { "range": [ 33, 45 ] } @@ -191,6 +196,7 @@ "protocol": "ah" } }, + "op": "==", "right": { "set": [ 23, @@ -232,6 +238,7 @@ "protocol": "ah" } }, + "op": "==", "right": { "set": [ { "range": [ 33, 55 ] } @@ -271,6 +278,7 @@ "protocol": "ah" } }, + "op": "==", "right": 111 } } @@ -302,6 +310,7 @@ "protocol": "ah" } }, + "op": "==", "right": { "range": [ 111, 222 ] } @@ -337,6 +346,7 @@ "protocol": "ah" } }, + "op": "==", "right": { "set": [ 111, @@ -378,6 +388,7 @@ "protocol": "ah" } }, + "op": "==", "right": { "set": [ { "range": [ 111, 122 ] } @@ -417,6 +428,7 @@ "protocol": "ah" } }, + "op": "==", "right": 123 } } @@ -448,6 +460,7 @@ "protocol": "ah" } }, + "op": "==", "right": { "set": [ 23, @@ -491,6 +504,7 @@ "protocol": "ah" } }, + "op": "==", "right": { "set": [ { "range": [ 23, 33 ] } @@ -530,6 +544,7 @@ "protocol": "ah" } }, + "op": "==", "right": { "range": [ 23, 33 ] } diff --git a/tests/py/inet/comp.t.json b/tests/py/inet/comp.t.json index 56fccafb..b9b24f98 100644 --- a/tests/py/inet/comp.t.json +++ b/tests/py/inet/comp.t.json @@ -24,6 +24,7 @@ "protocol": "comp" } }, + "op": "==", "right": "0x0" } } @@ -55,6 +56,7 @@ "protocol": "comp" } }, + "op": "==", "right": { "range": [ "0x33", "0x45" ] } @@ -90,6 +92,7 @@ "protocol": "comp" } }, + "op": "==", "right": { "set": [ "0x33", @@ -135,6 +138,7 @@ "protocol": "comp" } }, + "op": "==", "right": { "set": [ { "range": [ "0x33", "0x55" ] } @@ -174,6 +178,7 @@ "protocol": "comp" } }, + "op": "==", "right": 22 } } @@ -205,6 +210,7 @@ "protocol": "comp" } }, + "op": "==", "right": { "range": [ 33, 45 ] } @@ -240,6 +246,7 @@ "protocol": "comp" } }, + "op": "==", "right": { "set": [ 33, @@ -285,6 +292,7 @@ "protocol": "comp" } }, + "op": "==", "right": { "set": [ { "range": [ 33, 55 ] } diff --git a/tests/py/inet/comp.t.json.output b/tests/py/inet/comp.t.json.output index 21517998..435c3de4 100644 --- a/tests/py/inet/comp.t.json.output +++ b/tests/py/inet/comp.t.json.output @@ -24,6 +24,7 @@ "protocol": "comp" } }, + "op": "==", "right": 0 } } @@ -55,6 +56,7 @@ "protocol": "comp" } }, + "op": "==", "right": { "range": [ 51, 69 ] } @@ -90,6 +92,7 @@ "protocol": "comp" } }, + "op": "==", "right": { "set": [ 51, @@ -135,6 +138,7 @@ "protocol": "comp" } }, + "op": "==", "right": { "set": [ { "range": [ 51, 85 ] } diff --git a/tests/py/inet/ct.t.json b/tests/py/inet/ct.t.json index 9b54e1d0..02bb2d27 100644 --- a/tests/py/inet/ct.t.json +++ b/tests/py/inet/ct.t.json @@ -5,6 +5,7 @@ "left": { "meta": { "key": "nfproto" } }, + "op": "==", "right": "ipv4" } }, @@ -16,6 +17,7 @@ "key": "saddr" } }, + "op": "==", "right": "1.2.3.4" } } @@ -32,6 +34,7 @@ "key": "saddr" } }, + "op": "==", "right": "::1" } } diff --git a/tests/py/inet/ct.t.json.output b/tests/py/inet/ct.t.json.output index 5605ebcf..8b71519e 100644 --- a/tests/py/inet/ct.t.json.output +++ b/tests/py/inet/ct.t.json.output @@ -9,6 +9,7 @@ "key": "saddr" } }, + "op": "==", "right": "1.2.3.4" } } diff --git a/tests/py/inet/dccp.t.json b/tests/py/inet/dccp.t.json index 7d87966f..9260fbc5 100644 --- a/tests/py/inet/dccp.t.json +++ b/tests/py/inet/dccp.t.json @@ -8,6 +8,7 @@ "protocol": "dccp" } }, + "op": "==", "right": { "range": [ 21, 35 ] } @@ -43,6 +44,7 @@ "protocol": "dccp" } }, + "op": "==", "right": { "set": [ 23, @@ -86,6 +88,7 @@ "protocol": "dccp" } }, + "op": "==", "right": { "set": [ { "range": [ 20, 50 ] } @@ -105,6 +108,7 @@ "protocol": "dccp" } }, + "op": "==", "right": { "range": [ "ftp-data", "re-mail-ck" ] } @@ -122,6 +126,7 @@ "protocol": "dccp" } }, + "op": "==", "right": { "range": [ 20, 50 ] } @@ -139,6 +144,7 @@ "protocol": "dccp" } }, + "op": "==", "right": { "set": [ { "range": [ 20, 50 ] } @@ -178,6 +184,7 @@ "protocol": "dccp" } }, + "op": "==", "right": { "set": [ 23, @@ -221,6 +228,7 @@ "protocol": "dccp" } }, + "op": "==", "right": { "set": [ { "range": [ 20, 50 ] } @@ -260,6 +268,7 @@ "protocol": "dccp" } }, + "op": "==", "right": { "set": [ "request", @@ -317,6 +326,7 @@ "protocol": "dccp" } }, + "op": "==", "right": "request" } } diff --git a/tests/py/inet/dccp.t.json.output b/tests/py/inet/dccp.t.json.output index 889e4209..146741dd 100644 --- a/tests/py/inet/dccp.t.json.output +++ b/tests/py/inet/dccp.t.json.output @@ -8,6 +8,7 @@ "protocol": "dccp" } }, + "op": "==", "right": { "range": [ 20, 50 ] } diff --git a/tests/py/inet/esp.t.json b/tests/py/inet/esp.t.json index e6f59a65..84ea9eea 100644 --- a/tests/py/inet/esp.t.json +++ b/tests/py/inet/esp.t.json @@ -8,6 +8,7 @@ "protocol": "esp" } }, + "op": "==", "right": 100 } } @@ -39,6 +40,7 @@ "protocol": "esp" } }, + "op": "==", "right": { "range": [ 111, 222 ] } @@ -74,6 +76,7 @@ "protocol": "esp" } }, + "op": "==", "right": { "set": [ 100, @@ -115,6 +118,7 @@ "protocol": "esp" } }, + "op": "==", "right": { "set": [ { "range": [ 100, 102 ] } @@ -134,6 +138,7 @@ "protocol": "esp" } }, + "op": "==", "right": 22 } } @@ -149,6 +154,7 @@ "protocol": "esp" } }, + "op": "==", "right": { "range": [ 22, 24 ] } @@ -184,6 +190,7 @@ "protocol": "esp" } }, + "op": "==", "right": { "set": [ 22, @@ -225,6 +232,7 @@ "protocol": "esp" } }, + "op": "==", "right": { "set": [ { "range": [ 22, 25 ] } diff --git a/tests/py/inet/ether-ip.t.json b/tests/py/inet/ether-ip.t.json index b5356bb3..8f35b3d0 100644 --- a/tests/py/inet/ether-ip.t.json +++ b/tests/py/inet/ether-ip.t.json @@ -8,6 +8,7 @@ "protocol": "tcp" } }, + "op": "==", "right": 22 } }, @@ -16,6 +17,7 @@ "left": { "meta": { "key": "iiftype" } }, + "op": "==", "right": "ether" } }, @@ -27,6 +29,7 @@ "protocol": "ip" } }, + "op": "==", "right": "1.2.3.4" } }, @@ -38,6 +41,7 @@ "protocol": "ether" } }, + "op": "==", "right": "00:0f:54:0c:11:04" } }, @@ -56,6 +60,7 @@ "protocol": "tcp" } }, + "op": "==", "right": 22 } }, @@ -67,6 +72,7 @@ "protocol": "ip" } }, + "op": "==", "right": "1.2.3.4" } }, @@ -78,6 +84,7 @@ "protocol": "ether" } }, + "op": "==", "right": "00:0f:54:0c:11:04" } } diff --git a/tests/py/inet/ether-ip.t.json.output b/tests/py/inet/ether-ip.t.json.output index 2ae5655a..f659113d 100644 --- a/tests/py/inet/ether-ip.t.json.output +++ b/tests/py/inet/ether-ip.t.json.output @@ -8,6 +8,7 @@ "protocol": "tcp" } }, + "op": "==", "right": 22 } }, @@ -19,6 +20,7 @@ "protocol": "ether" } }, + "op": "==", "right": "00:0f:54:0c:11:04" } }, @@ -30,6 +32,7 @@ "protocol": "ip" } }, + "op": "==", "right": "1.2.3.4" } }, diff --git a/tests/py/inet/ether.t.json b/tests/py/inet/ether.t.json index 69b75ac0..84b184c7 100644 --- a/tests/py/inet/ether.t.json +++ b/tests/py/inet/ether.t.json @@ -8,6 +8,7 @@ "protocol": "tcp" } }, + "op": "==", "right": 22 } }, @@ -16,6 +17,7 @@ "left": { "meta": { "key": "iiftype" } }, + "op": "==", "right": "ether" } }, @@ -27,6 +29,7 @@ "protocol": "ether" } }, + "op": "==", "right": "00:0f:54:0c:11:04" } }, @@ -45,6 +48,7 @@ "protocol": "tcp" } }, + "op": "==", "right": 22 } }, @@ -56,6 +60,7 @@ "protocol": "ether" } }, + "op": "==", "right": "00:0f:54:0c:11:04" } }, @@ -74,6 +79,7 @@ "protocol": "ether" } }, + "op": "==", "right": "00:0f:54:0c:11:04" } }, diff --git a/tests/py/inet/ether.t.json.output b/tests/py/inet/ether.t.json.output index 19e3865b..9ae8c442 100644 --- a/tests/py/inet/ether.t.json.output +++ b/tests/py/inet/ether.t.json.output @@ -8,6 +8,7 @@ "protocol": "tcp" } }, + "op": "==", "right": 22 } }, @@ -19,6 +20,7 @@ "protocol": "ether" } }, + "op": "==", "right": "00:0f:54:0c:11:04" } }, diff --git a/tests/py/inet/fib.t.json b/tests/py/inet/fib.t.json index 92bb5ec0..c2989156 100644 --- a/tests/py/inet/fib.t.json +++ b/tests/py/inet/fib.t.json @@ -30,6 +30,7 @@ "result": "oifname" } }, + "op": "==", "right": "lo" } } @@ -48,6 +49,7 @@ "result": "type" } }, + "op": "==", "right": "local" } } @@ -104,6 +106,7 @@ "result": "oif" } }, + "op": "==", "right": true } } @@ -121,6 +124,7 @@ "result": "oif" } }, + "op": "==", "right": false } } diff --git a/tests/py/inet/icmp.t.json b/tests/py/inet/icmp.t.json index efc40428..64be2b36 100644 --- a/tests/py/inet/icmp.t.json +++ b/tests/py/inet/icmp.t.json @@ -8,6 +8,7 @@ "protocol": "icmp" } }, + "op": "==", "right": "echo-request" } } @@ -23,6 +24,7 @@ "protocol": "icmpv6" } }, + "op": "==", "right": "echo-request" } } @@ -33,6 +35,7 @@ { "match": { "left": { "meta": { "key": "nfproto" } }, + "op": "==", "right": "ipv4" } }, @@ -44,6 +47,7 @@ "protocol": "icmp" } }, + "op": "==", "right": "echo-request" } } @@ -54,6 +58,7 @@ { "match": { "left": { "meta": { "key": "nfproto" } }, + "op": "==", "right": "ipv4" } }, @@ -65,6 +70,7 @@ "protocol": "icmpv6" } }, + "op": "==", "right": "echo-request" } } @@ -75,6 +81,7 @@ { "match": { "left": { "meta": { "key": "nfproto" } }, + "op": "==", "right": "ipv6" } }, @@ -86,6 +93,7 @@ "protocol": "icmp" } }, + "op": "==", "right": "echo-request" } } @@ -96,6 +104,7 @@ { "match": { "left": { "meta": { "key": "nfproto" } }, + "op": "==", "right": "ipv6" } }, @@ -107,6 +116,7 @@ "protocol": "icmpv6" } }, + "op": "==", "right": "echo-request" } } diff --git a/tests/py/inet/icmp.t.json.output b/tests/py/inet/icmp.t.json.output index a5ee48be..062c82f5 100644 --- a/tests/py/inet/icmp.t.json.output +++ b/tests/py/inet/icmp.t.json.output @@ -8,6 +8,7 @@ "protocol": "icmp" } }, + "op": "==", "right": "echo-request" } } @@ -23,6 +24,7 @@ "protocol": "icmpv6" } }, + "op": "==", "right": "echo-request" } } diff --git a/tests/py/inet/icmpX.t.json b/tests/py/inet/icmpX.t.json index b9905e9d..8e130917 100644 --- a/tests/py/inet/icmpX.t.json +++ b/tests/py/inet/icmpX.t.json @@ -8,6 +8,7 @@ "protocol": "ip" } }, + "op": "==", "right": "icmp" } }, @@ -19,6 +20,7 @@ "protocol": "icmp" } }, + "op": "==", "right": "echo-request" } } @@ -34,6 +36,7 @@ "protocol": "icmp" } }, + "op": "==", "right": "echo-request" } } @@ -49,6 +52,7 @@ "protocol": "ip6" } }, + "op": "==", "right": "icmpv6" } }, @@ -60,6 +64,7 @@ "protocol": "icmpv6" } }, + "op": "==", "right": "echo-request" } } @@ -75,6 +80,7 @@ "protocol": "icmpv6" } }, + "op": "==", "right": "echo-request" } } @@ -90,6 +96,7 @@ "protocol": "ip" } }, + "op": "==", "right": "ipv6-icmp" } }, @@ -98,6 +105,7 @@ "left": { "meta": { "key": "l4proto" } }, + "op": "==", "right": "ipv6-icmp" } }, @@ -109,6 +117,7 @@ "protocol": "icmpv6" } }, + "op": "==", "right": 1 } } diff --git a/tests/py/inet/icmpX.t.json.output b/tests/py/inet/icmpX.t.json.output index 15fdd15a..9b0bf9f7 100644 --- a/tests/py/inet/icmpX.t.json.output +++ b/tests/py/inet/icmpX.t.json.output @@ -8,6 +8,7 @@ "protocol": "ip" } }, + "op": "==", "right": 1 } }, @@ -19,6 +20,7 @@ "protocol": "icmp" } }, + "op": "==", "right": "echo-request" } } @@ -34,6 +36,7 @@ "protocol": "ip6" } }, + "op": "==", "right": 58 } }, @@ -45,6 +48,7 @@ "protocol": "icmpv6" } }, + "op": "==", "right": "echo-request" } } @@ -60,6 +64,7 @@ "protocol": "ip" } }, + "op": "==", "right": 58 } }, @@ -68,6 +73,7 @@ "left": { "meta": { "key": "l4proto" } }, + "op": "==", "right": 58 } }, @@ -79,6 +85,7 @@ "protocol": "icmpv6" } }, + "op": "==", "right": "destination-unreachable" } } diff --git a/tests/py/inet/ip.t.json b/tests/py/inet/ip.t.json index 4b2efd54..638fb7d8 100644 --- a/tests/py/inet/ip.t.json +++ b/tests/py/inet/ip.t.json @@ -24,6 +24,7 @@ } ] }, + "op": "==", "right": { "set": [ { diff --git a/tests/py/inet/ip_tcp.t.json b/tests/py/inet/ip_tcp.t.json index e2f918aa..87cb9bff 100644 --- a/tests/py/inet/ip_tcp.t.json +++ b/tests/py/inet/ip_tcp.t.json @@ -8,6 +8,7 @@ "protocol": "ip" } }, + "op": "==", "right": "tcp" } }, @@ -19,6 +20,7 @@ "protocol": "tcp" } }, + "op": "==", "right": 22 } } @@ -34,6 +36,7 @@ "protocol": "ip" } }, + "op": "==", "right": "tcp" } }, @@ -45,6 +48,7 @@ "protocol": "ip" } }, + "op": "==", "right": "1.2.3.4" } }, @@ -56,6 +60,7 @@ "protocol": "tcp" } }, + "op": "==", "right": 22 } } @@ -71,6 +76,7 @@ "protocol": "ip" } }, + "op": "==", "right": "tcp" } }, @@ -85,6 +91,7 @@ "protocol": "ip" } }, + "op": "==", "right": "1.2.3.4" } }, @@ -96,6 +103,7 @@ "protocol": "tcp" } }, + "op": "==", "right": 22 } } @@ -111,6 +119,7 @@ "protocol": "ip" } }, + "op": "==", "right": "tcp" } }, @@ -125,6 +134,7 @@ "protocol": "tcp" } }, + "op": "==", "right": 22 } } @@ -140,6 +150,7 @@ "protocol": "ether" } }, + "op": "==", "right": "ip" } }, @@ -151,6 +162,7 @@ "protocol": "tcp" } }, + "op": "==", "right": 22 } } diff --git a/tests/py/inet/ip_tcp.t.json.output b/tests/py/inet/ip_tcp.t.json.output index bd6a8620..4a6a05d7 100644 --- a/tests/py/inet/ip_tcp.t.json.output +++ b/tests/py/inet/ip_tcp.t.json.output @@ -8,6 +8,7 @@ "protocol": "ip" } }, + "op": "==", "right": 6 } }, @@ -19,6 +20,7 @@ "protocol": "tcp" } }, + "op": "==", "right": 22 } } @@ -34,6 +36,7 @@ "protocol": "ip" } }, + "op": "==", "right": "1.2.3.4" } }, @@ -45,6 +48,7 @@ "protocol": "tcp" } }, + "op": "==", "right": 22 } } @@ -60,6 +64,7 @@ "protocol": "ip" } }, + "op": "==", "right": 6 } }, @@ -74,6 +79,7 @@ "protocol": "ip" } }, + "op": "==", "right": "1.2.3.4" } }, @@ -85,6 +91,7 @@ "protocol": "tcp" } }, + "op": "==", "right": 22 } } @@ -100,6 +107,7 @@ "protocol": "ip" } }, + "op": "==", "right": 6 } }, @@ -114,6 +122,7 @@ "protocol": "tcp" } }, + "op": "==", "right": 22 } } diff --git a/tests/py/inet/meta.t.json b/tests/py/inet/meta.t.json index 5bf8a547..77f46ab6 100644 --- a/tests/py/inet/meta.t.json +++ b/tests/py/inet/meta.t.json @@ -5,6 +5,7 @@ "left": { "meta": { "key": "nfproto" } }, + "op": "==", "right": "ipv4" } } @@ -17,6 +18,7 @@ "left": { "meta": { "key": "nfproto" } }, + "op": "==", "right": "ipv6" } } @@ -29,6 +31,7 @@ "left": { "meta": { "key": "nfproto" } }, + "op": "==", "right": { "set": [ "ipv4", @@ -64,6 +67,7 @@ "left": { "meta": { "key": "nfproto" } }, + "op": "==", "right": "ipv6" } }, @@ -75,6 +79,7 @@ "protocol": "tcp" } }, + "op": "==", "right": 22 } } @@ -87,6 +92,7 @@ "left": { "meta": { "key": "nfproto" } }, + "op": "==", "right": "ipv4" } }, @@ -98,6 +104,7 @@ "protocol": "tcp" } }, + "op": "==", "right": 22 } } @@ -110,6 +117,7 @@ "left": { "meta": { "key": "nfproto" } }, + "op": "==", "right": "ipv4" } }, @@ -121,6 +129,7 @@ "protocol": "ip" } }, + "op": "==", "right": "1.2.3.4" } } @@ -133,6 +142,7 @@ "left": { "meta": { "key": "nfproto" } }, + "op": "==", "right": "ipv6" } }, @@ -141,6 +151,7 @@ "left": { "meta": { "key": "l4proto" } }, + "op": "==", "right": "tcp" } } @@ -153,6 +164,7 @@ "left": { "meta": { "key": "nfproto" } }, + "op": "==", "right": "ipv4" } }, @@ -167,6 +179,7 @@ "protocol": "ip" } }, + "op": "==", "right": "1.2.3.4" } } @@ -179,6 +192,7 @@ "left": { "meta": { "key": "secpath" } }, + "op": "==", "right": true } } @@ -191,6 +205,7 @@ "left": { "meta": { "key": "secpath" } }, + "op": "==", "right": false } } diff --git a/tests/py/inet/meta.t.json.output b/tests/py/inet/meta.t.json.output index 565e2fa0..d0bb0a61 100644 --- a/tests/py/inet/meta.t.json.output +++ b/tests/py/inet/meta.t.json.output @@ -8,6 +8,7 @@ "protocol": "ip" } }, + "op": "==", "right": "1.2.3.4" } } @@ -20,6 +21,7 @@ "left": { "meta": { "key": "nfproto" } }, + "op": "==", "right": "ipv6" } }, @@ -28,6 +30,7 @@ "left": { "meta": { "key": "l4proto" } }, + "op": "==", "right": 6 } } diff --git a/tests/py/inet/reject.t.json b/tests/py/inet/reject.t.json index b63cb7df..bfa94f84 100644 --- a/tests/py/inet/reject.t.json +++ b/tests/py/inet/reject.t.json @@ -115,6 +115,7 @@ "left": { "meta": { "key": "mark" } }, + "op": "==", "right": 12345 } }, @@ -139,6 +140,7 @@ "left": { "meta": { "key": "nfproto" } }, + "op": "==", "right": "ipv4" } }, @@ -154,6 +156,7 @@ "left": { "meta": { "key": "nfproto" } }, + "op": "==", "right": "ipv6" } }, @@ -209,6 +212,7 @@ "left": { "meta": { "key": "nfproto" } }, + "op": "==", "right": "ipv4" } }, @@ -227,6 +231,7 @@ "left": { "meta": { "key": "nfproto" } }, + "op": "==", "right": "ipv6" } }, diff --git a/tests/py/inet/reject.t.json.output b/tests/py/inet/reject.t.json.output index 46875434..73846fb0 100644 --- a/tests/py/inet/reject.t.json.output +++ b/tests/py/inet/reject.t.json.output @@ -5,6 +5,7 @@ "left": { "meta": { "key": "nfproto" } }, + "op": "==", "right": "ipv4" } }, @@ -23,6 +24,7 @@ "left": { "meta": { "key": "nfproto" } }, + "op": "==", "right": "ipv4" } }, @@ -41,6 +43,7 @@ "left": { "meta": { "key": "nfproto" } }, + "op": "==", "right": "ipv4" } }, @@ -59,6 +62,7 @@ "left": { "meta": { "key": "nfproto" } }, + "op": "==", "right": "ipv4" } }, @@ -74,6 +78,7 @@ "left": { "meta": { "key": "nfproto" } }, + "op": "==", "right": "ipv4" } }, @@ -92,6 +97,7 @@ "left": { "meta": { "key": "nfproto" } }, + "op": "==", "right": "ipv4" } }, @@ -110,6 +116,7 @@ "left": { "meta": { "key": "nfproto" } }, + "op": "==", "right": "ipv4" } }, @@ -128,6 +135,7 @@ "left": { "meta": { "key": "nfproto" } }, + "op": "==", "right": "ipv6" } }, @@ -146,6 +154,7 @@ "left": { "meta": { "key": "nfproto" } }, + "op": "==", "right": "ipv6" } }, @@ -164,6 +173,7 @@ "left": { "meta": { "key": "nfproto" } }, + "op": "==", "right": "ipv6" } }, @@ -182,6 +192,7 @@ "left": { "meta": { "key": "nfproto" } }, + "op": "==", "right": "ipv6" } }, @@ -197,6 +208,7 @@ "left": { "meta": { "key": "l4proto" } }, + "op": "==", "right": 6 } }, @@ -205,6 +217,7 @@ "left": { "meta": { "key": "mark" } }, + "op": "==", "right": 12345 } }, diff --git a/tests/py/inet/rt.t.json b/tests/py/inet/rt.t.json index e81bcfd8..6dbea413 100644 --- a/tests/py/inet/rt.t.json +++ b/tests/py/inet/rt.t.json @@ -5,6 +5,7 @@ "left": { "meta": { "key": "nfproto" } }, + "op": "==", "right": "ipv4" } }, @@ -15,6 +16,7 @@ "key": "nexthop" } }, + "op": "==", "right": "192.168.0.1" } } @@ -30,6 +32,7 @@ "key": "nexthop" } }, + "op": "==", "right": "fd00::1" } } diff --git a/tests/py/inet/rt.t.json.output b/tests/py/inet/rt.t.json.output index de765bd9..382ef87e 100644 --- a/tests/py/inet/rt.t.json.output +++ b/tests/py/inet/rt.t.json.output @@ -5,6 +5,7 @@ "left": { "meta": { "key": "nfproto" } }, + "op": "==", "right": "ipv4" } }, @@ -16,6 +17,7 @@ "key": "nexthop" } }, + "op": "==", "right": "192.168.0.1" } } diff --git a/tests/py/inet/sctp.t.json b/tests/py/inet/sctp.t.json index f382c6d2..2684b034 100644 --- a/tests/py/inet/sctp.t.json +++ b/tests/py/inet/sctp.t.json @@ -8,6 +8,7 @@ "protocol": "sctp" } }, + "op": "==", "right": 23 } } @@ -39,6 +40,7 @@ "protocol": "sctp" } }, + "op": "==", "right": { "range": [ 23, 44 ] } @@ -74,6 +76,7 @@ "protocol": "sctp" } }, + "op": "==", "right": { "set": [ 23, @@ -117,6 +120,7 @@ "protocol": "sctp" } }, + "op": "==", "right": { "set": [ { "range": [ 23, 44 ] } @@ -156,6 +160,7 @@ "protocol": "sctp" } }, + "op": "==", "right": 23 } } @@ -187,6 +192,7 @@ "protocol": "sctp" } }, + "op": "==", "right": { "range": [ 23, 44 ] } @@ -222,6 +228,7 @@ "protocol": "sctp" } }, + "op": "==", "right": { "set": [ 23, @@ -265,6 +272,7 @@ "protocol": "sctp" } }, + "op": "==", "right": { "set": [ { "range": [ 23, 44 ] } @@ -304,6 +312,7 @@ "protocol": "sctp" } }, + "op": "==", "right": 1111 } } @@ -335,6 +344,7 @@ "protocol": "sctp" } }, + "op": "==", "right": { "range": [ 21, 333 ] } @@ -370,6 +380,7 @@ "protocol": "sctp" } }, + "op": "==", "right": { "set": [ 22, @@ -413,6 +424,7 @@ "protocol": "sctp" } }, + "op": "==", "right": { "set": [ { "range": [ 22, 44 ] } @@ -452,6 +464,7 @@ "protocol": "sctp" } }, + "op": "==", "right": 22 } } @@ -483,6 +496,7 @@ "protocol": "sctp" } }, + "op": "==", "right": { "range": [ 33, 45 ] } @@ -518,6 +532,7 @@ "protocol": "sctp" } }, + "op": "==", "right": { "set": [ 33, @@ -563,6 +578,7 @@ "protocol": "sctp" } }, + "op": "==", "right": { "set": [ { "range": [ 33, 55 ] } diff --git a/tests/py/inet/sets.t.json b/tests/py/inet/sets.t.json index 34f37588..bcb638f2 100644 --- a/tests/py/inet/sets.t.json +++ b/tests/py/inet/sets.t.json @@ -8,6 +8,7 @@ "protocol": "ip" } }, + "op": "==", "right": "@set1" } }, diff --git a/tests/py/inet/socket.t.json b/tests/py/inet/socket.t.json index 235c3e94..d672c500 100644 --- a/tests/py/inet/socket.t.json +++ b/tests/py/inet/socket.t.json @@ -7,6 +7,7 @@ "key": "transparent" } }, + "op": "==", "right": 0 } } @@ -21,6 +22,7 @@ "key": "transparent" } }, + "op": "==", "right": 1 } } 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 } } diff --git a/tests/py/inet/tcp.t.json.output b/tests/py/inet/tcp.t.json.output index e840169a..50282ec5 100644 --- a/tests/py/inet/tcp.t.json.output +++ b/tests/py/inet/tcp.t.json.output @@ -8,6 +8,7 @@ "protocol": "tcp" } }, + "op": "==", "right": { "set": [ 23, @@ -32,6 +33,7 @@ "protocol": "tcp" } }, + "op": "==", "right": 1024 } }, @@ -43,6 +45,7 @@ "protocol": "tcp" } }, + "op": "==", "right": 22 } }, @@ -54,6 +57,7 @@ "protocol": "tcp" } }, + "op": "==", "right": 0 } } @@ -69,6 +73,7 @@ "protocol": "tcp" } }, + "op": "==", "right": { "set": [ 1022, @@ -85,6 +90,7 @@ "protocol": "tcp" } }, + "op": "==", "right": 22 } }, @@ -96,6 +102,7 @@ "protocol": "tcp" } }, + "op": "==", "right": 0 } } diff --git a/tests/py/inet/tcpopt.t.json b/tests/py/inet/tcpopt.t.json index 431ee021..45e9c293 100644 --- a/tests/py/inet/tcpopt.t.json +++ b/tests/py/inet/tcpopt.t.json @@ -8,6 +8,7 @@ "name": "eol" } }, + "op": "==", "right": 1 } } @@ -23,6 +24,7 @@ "name": "noop" } }, + "op": "==", "right": 1 } } @@ -38,6 +40,7 @@ "name": "maxseg" } }, + "op": "==", "right": 1 } } @@ -53,6 +56,7 @@ "name": "maxseg" } }, + "op": "==", "right": 1 } } @@ -68,6 +72,7 @@ "name": "maxseg" } }, + "op": "==", "right": 1 } } @@ -83,6 +88,7 @@ "name": "window" } }, + "op": "==", "right": 1 } } @@ -98,6 +104,7 @@ "name": "window" } }, + "op": "==", "right": 1 } } @@ -113,6 +120,7 @@ "name": "window" } }, + "op": "==", "right": 1 } } @@ -128,6 +136,7 @@ "name": "sack-permitted" } }, + "op": "==", "right": 1 } } @@ -143,6 +152,7 @@ "name": "sack-permitted" } }, + "op": "==", "right": 1 } } @@ -158,6 +168,7 @@ "name": "sack" } }, + "op": "==", "right": 1 } } @@ -173,6 +184,7 @@ "name": "sack" } }, + "op": "==", "right": 1 } } @@ -188,6 +200,7 @@ "name": "sack" } }, + "op": "==", "right": 1 } } @@ -203,6 +216,7 @@ "name": "sack0" } }, + "op": "==", "right": 1 } } @@ -218,6 +232,7 @@ "name": "sack1" } }, + "op": "==", "right": 1 } } @@ -233,6 +248,7 @@ "name": "sack2" } }, + "op": "==", "right": 1 } } @@ -248,6 +264,7 @@ "name": "sack3" } }, + "op": "==", "right": 1 } } @@ -263,6 +280,7 @@ "name": "sack0" } }, + "op": "==", "right": 1 } } @@ -278,6 +296,7 @@ "name": "sack1" } }, + "op": "==", "right": 1 } } @@ -293,6 +312,7 @@ "name": "sack2" } }, + "op": "==", "right": 1 } } @@ -308,6 +328,7 @@ "name": "sack3" } }, + "op": "==", "right": 1 } } @@ -323,6 +344,7 @@ "name": "timestamp" } }, + "op": "==", "right": 1 } } @@ -338,6 +360,7 @@ "name": "timestamp" } }, + "op": "==", "right": 1 } } @@ -353,6 +376,7 @@ "name": "timestamp" } }, + "op": "==", "right": 1 } } @@ -368,6 +392,7 @@ "name": "timestamp" } }, + "op": "==", "right": 1 } } @@ -382,6 +407,7 @@ "name": "window" } }, + "op": "==", "right": true } } @@ -396,6 +422,7 @@ "name": "window" } }, + "op": "==", "right": false } } diff --git a/tests/py/inet/tcpopt.t.json.output b/tests/py/inet/tcpopt.t.json.output index 302108c2..ad0d25f4 100644 --- a/tests/py/inet/tcpopt.t.json.output +++ b/tests/py/inet/tcpopt.t.json.output @@ -8,6 +8,7 @@ "name": "sack" } }, + "op": "==", "right": 1 } } @@ -23,6 +24,7 @@ "name": "sack" } }, + "op": "==", "right": 1 } } diff --git a/tests/py/inet/udp.t.json b/tests/py/inet/udp.t.json index 5ea073d7..f8826640 100644 --- a/tests/py/inet/udp.t.json +++ b/tests/py/inet/udp.t.json @@ -8,6 +8,7 @@ "protocol": "udp" } }, + "op": "==", "right": 80 } }, @@ -45,6 +46,7 @@ "protocol": "udp" } }, + "op": "==", "right": { "range": [ 50, 70 ] } @@ -86,6 +88,7 @@ "protocol": "udp" } }, + "op": "==", "right": { "set": [ 49, @@ -133,6 +136,7 @@ "protocol": "udp" } }, + "op": "==", "right": { "set": [ { "range": [ 12, 40 ] } @@ -172,6 +176,7 @@ "protocol": "udp" } }, + "op": "==", "right": 80 } }, @@ -209,6 +214,7 @@ "protocol": "udp" } }, + "op": "==", "right": { "range": [ 70, 75 ] } @@ -250,6 +256,7 @@ "protocol": "udp" } }, + "op": "==", "right": { "set": [ 49, @@ -297,6 +304,7 @@ "protocol": "udp" } }, + "op": "==", "right": { "set": [ { "range": [ 70, 75 ] } @@ -342,6 +350,7 @@ "protocol": "udp" } }, + "op": "==", "right": 6666 } } @@ -373,6 +382,7 @@ "protocol": "udp" } }, + "op": "==", "right": { "range": [ 50, 65 ] } @@ -414,6 +424,7 @@ "protocol": "udp" } }, + "op": "==", "right": { "set": [ 50, @@ -461,6 +472,7 @@ "protocol": "udp" } }, + "op": "==", "right": { "set": [ { "range": [ 35, 50 ] } @@ -500,6 +512,7 @@ "protocol": "udp" } }, + "op": "==", "right": 6666 } }, @@ -542,6 +555,7 @@ "protocol": "udp" } }, + "op": "==", "right": 22 } } @@ -573,6 +587,7 @@ "protocol": "udp" } }, + "op": "==", "right": { "range": [ 33, 45 ] } @@ -608,6 +623,7 @@ "protocol": "udp" } }, + "op": "==", "right": { "set": [ 33, @@ -653,6 +669,7 @@ "protocol": "udp" } }, + "op": "==", "right": { "set": [ { "range": [ 33, 55 ] } @@ -689,6 +706,7 @@ "left": { "meta": { "key": "iif" } }, + "op": "==", "right": "lo" } }, @@ -712,6 +730,7 @@ "left": { "meta": { "key": "iif" } }, + "op": "==", "right": "lo" } }, diff --git a/tests/py/inet/udplite.t.json b/tests/py/inet/udplite.t.json index 75e72579..f56bee47 100644 --- a/tests/py/inet/udplite.t.json +++ b/tests/py/inet/udplite.t.json @@ -8,6 +8,7 @@ "protocol": "udplite" } }, + "op": "==", "right": 80 } }, @@ -45,6 +46,7 @@ "protocol": "udplite" } }, + "op": "==", "right": { "range": [ 50, 70 ] } @@ -86,6 +88,7 @@ "protocol": "udplite" } }, + "op": "==", "right": { "set": [ 49, @@ -133,6 +136,7 @@ "protocol": "udplite" } }, + "op": "==", "right": { "set": [ { "range": [ 12, 40 ] } @@ -172,6 +176,7 @@ "protocol": "udplite" } }, + "op": "==", "right": 80 } }, @@ -209,6 +214,7 @@ "protocol": "udplite" } }, + "op": "==", "right": { "range": [ 70, 75 ] } @@ -250,6 +256,7 @@ "protocol": "udplite" } }, + "op": "==", "right": { "set": [ 49, @@ -297,6 +304,7 @@ "protocol": "udplite" } }, + "op": "==", "right": { "set": [ { "range": [ 70, 75 ] } @@ -342,6 +350,7 @@ "protocol": "udplite" } }, + "op": "==", "right": 6666 } }, @@ -384,6 +393,7 @@ "protocol": "udplite" } }, + "op": "==", "right": 22 } } @@ -415,6 +425,7 @@ "protocol": "udplite" } }, + "op": "==", "right": { "range": [ 33, 45 ] } @@ -450,6 +461,7 @@ "protocol": "udplite" } }, + "op": "==", "right": { "set": [ 33, @@ -495,6 +507,7 @@ "protocol": "udplite" } }, + "op": "==", "right": { "set": [ { "range": [ 33, 55 ] } -- cgit v1.2.3