From 64b9aa3803dd1f6ca529a1f3bd7aa0875bdbd9d9 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Sat, 7 Mar 2020 03:00:10 +0100 Subject: tests/py: Add tests involving concatenated ranges Very basic testing, just a set definition, a rule which references it and another one with an anonymous set. Sadly this is already enough to expose some pending issues: * Payload dependency killing ignores the concatenated IP header expressions on LHS, so rule output is asymmetric. * Anonymous sets don't accept concatenated ranges yet, so the second rule is manually disabled for now. Signed-off-by: Phil Sutter --- tests/py/inet/sets.t.json | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'tests/py/inet/sets.t.json') diff --git a/tests/py/inet/sets.t.json b/tests/py/inet/sets.t.json index bcb638f2..58e19ef6 100644 --- a/tests/py/inet/sets.t.json +++ b/tests/py/inet/sets.t.json @@ -36,3 +36,38 @@ } ] +# ip saddr . ip daddr . tcp dport @set3 accept +[ + { + "match": { + "left": { + "concat": [ + { + "payload": { + "field": "saddr", + "protocol": "ip" + } + }, + { + "payload": { + "field": "daddr", + "protocol": "ip" + } + }, + { + "payload": { + "field": "dport", + "protocol": "tcp" + } + } + ] + }, + "op": "==", + "right": "@set3" + } + }, + { + "accept": null + } +] + -- cgit v1.2.3