diff options
author | Florian Westphal <fw@strlen.de> | 2018-02-24 10:45:32 +0100 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2018-02-26 18:32:47 +0100 |
commit | d3d2c4bd782368e9024d88795659325372b99ed8 (patch) | |
tree | d0beb2e966257e981954052b080fef06ab7a7125 /tests/py/any/rawpayload.t | |
parent | 594968b4fd4a68e57868b316c904ec676c6618c3 (diff) |
tests: add raw payload test cases.
Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'tests/py/any/rawpayload.t')
-rw-r--r-- | tests/py/any/rawpayload.t | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/py/any/rawpayload.t b/tests/py/any/rawpayload.t new file mode 100644 index 00000000..9a3402f1 --- /dev/null +++ b/tests/py/any/rawpayload.t @@ -0,0 +1,19 @@ +:input;type filter hook input priority 0 +:ingress;type filter hook ingress device lo priority 0 + +*inet;test-inet;input +*netdev;test-netdev;ingress + +meta l4proto { tcp, udp, sctp} @th,16,16 { 22, 23, 80 };ok;meta l4proto { 6, 17, 132} @th,16,16 { 22, 23, 80} +meta l4proto tcp @th,16,16 { 22, 23, 80};ok;tcp dport { 22, 23, 80} +@nh,8,8 255;ok +@nh,8,16 0;ok + +# out of range (0-1) +@th,16,1 2;fail + +@ll,0,0 2;fail +@ll,0,1;fail +@ll,0,1 1;ok;@ll,0,8 & 128 == 128 +@ll,0,8 and 0x80 eq 0x80;ok;@ll,0,8 & 128 == 128 +@ll,0,128 0xfedcba987654321001234567890abcde;ok;@ll,0,128 338770000845734292516042252062074518750 |