diff options
author | Phil Sutter <phil@nwl.cc> | 2020-03-07 03:00:10 +0100 |
---|---|---|
committer | Phil Sutter <phil@nwl.cc> | 2020-03-10 16:28:58 +0100 |
commit | 64b9aa3803dd1f6ca529a1f3bd7aa0875bdbd9d9 (patch) | |
tree | c18dd45ac98e673bc17e6b33fe7549e1ebb565e3 /tests/py/inet/sets.t.payload.bridge | |
parent | 9475ca305a993751b05cf26ef8e785a00de98b94 (diff) |
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 <phil@nwl.cc>
Diffstat (limited to 'tests/py/inet/sets.t.payload.bridge')
-rw-r--r-- | tests/py/inet/sets.t.payload.bridge | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/py/inet/sets.t.payload.bridge b/tests/py/inet/sets.t.payload.bridge index f5aaab1d..089d9dd7 100644 --- a/tests/py/inet/sets.t.payload.bridge +++ b/tests/py/inet/sets.t.payload.bridge @@ -13,3 +13,16 @@ bridge test-inet input [ payload load 16b @ network header + 24 => reg 1 ] [ lookup reg 1 set set2 0x1 ] [ immediate reg 0 accept ] + +# ip saddr . ip daddr . tcp dport @set3 accept +bridge + [ meta load protocol => reg 1 ] + [ cmp eq reg 1 0x00000008 ] + [ meta load l4proto => reg 1 ] + [ cmp eq reg 1 0x00000006 ] + [ payload load 4b @ network header + 12 => reg 1 ] + [ payload load 4b @ network header + 16 => reg 9 ] + [ payload load 2b @ transport header + 2 => reg 10 ] + [ lookup reg 1 set set3 ] + [ immediate reg 0 accept ] + |