summaryrefslogtreecommitdiffstats
path: root/tests/py/inet/tcp.t.payload
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2021-07-27 23:18:16 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2021-07-28 00:31:59 +0200
commit5f6480a1361c444fa05087c1da1c463d408ef1c2 (patch)
treec338890b432edd30783667b707b15f13219c5048 /tests/py/inet/tcp.t.payload
parent347a4aa16e64b8708d61eeb074736bea02258d1d (diff)
tests: py: tcp flags & (fin | syn | rst | ack) == syn
Add a test case to cover translation to tcp flags syn / fin,syn,rst,ack. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/py/inet/tcp.t.payload')
-rw-r--r--tests/py/inet/tcp.t.payload8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/py/inet/tcp.t.payload b/tests/py/inet/tcp.t.payload
index 77b30188..4e795aa9 100644
--- a/tests/py/inet/tcp.t.payload
+++ b/tests/py/inet/tcp.t.payload
@@ -394,6 +394,14 @@ inet test-inet input
[ bitwise reg 1 = ( reg 1 & 0x00000017 ) ^ 0x00000000 ]
[ cmp eq reg 1 0x00000002 ]
+# tcp flags & (fin | syn | rst | ack) == syn
+inet test-inet input
+ [ meta load l4proto => reg 1 ]
+ [ cmp eq reg 1 0x00000006 ]
+ [ payload load 1b @ transport header + 13 => reg 1 ]
+ [ bitwise reg 1 = ( reg 1 & 0x00000017 ) ^ 0x00000000 ]
+ [ cmp eq reg 1 0x00000002 ]
+
# tcp flags & (fin | syn | rst | ack) != syn
inet test-inet input
[ meta load l4proto => reg 1 ]