summaryrefslogtreecommitdiffstats
path: root/tests/py/inet/tcp.t.payload.netdev
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2016-11-30 22:07:14 +0100
committerFlorian Westphal <fw@strlen.de>2016-11-30 22:19:48 +0100
commit53a0bd44d336f54f26f3364eb075e91d91e4782e (patch)
tree0611c3154aff2c8fb364e490b5c0aef19d34a035 /tests/py/inet/tcp.t.payload.netdev
parent8f47cd14bb73212a5aca920c22e0b45da0673000 (diff)
tests: py: Test TCP flags match with parentheses
This should test the fix in commit 7222680eb328b ("parser_bison: Allow parens on RHS of relational_expr"). Signed-off-by: Phil Sutter <phil@nwl.cc> Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'tests/py/inet/tcp.t.payload.netdev')
-rw-r--r--tests/py/inet/tcp.t.payload.netdev8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/py/inet/tcp.t.payload.netdev b/tests/py/inet/tcp.t.payload.netdev
index dd79898e..dbf4b131 100644
--- a/tests/py/inet/tcp.t.payload.netdev
+++ b/tests/py/inet/tcp.t.payload.netdev
@@ -421,6 +421,14 @@ inet test-inet input
[ payload load 1b @ transport header + 13 => reg 1 ]
[ cmp neq reg 1 0x00000080 ]
+# tcp 'flags & (syn|fin) == (syn|fin)'
+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 & 0x00000003 ) ^ 0x00000000 ]
+ [ cmp eq reg 1 0x00000003 ]
+
# tcp window 22222
inet test-inet input
[ meta load l4proto => reg 1 ]