summaryrefslogtreecommitdiffstats
path: root/tests/py/inet/socket.t.payload
diff options
context:
space:
mode:
authorMáté Eckl <ecklm94@gmail.com>2018-06-04 09:36:32 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2018-06-06 19:52:45 +0200
commit5d22fc81fe27e24dba7a78743318a401353e506b (patch)
treea8c86a2dec8ddf8f83ff76151799673eb9c172e6 /tests/py/inet/socket.t.payload
parentb79d71532ba4dd3dc3c97f48831a33424cf8e637 (diff)
test: py: Add test cases for socket matching
Signed-off-by: Máté Eckl <ecklm94@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/py/inet/socket.t.payload')
-rw-r--r--tests/py/inet/socket.t.payload30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/py/inet/socket.t.payload b/tests/py/inet/socket.t.payload
new file mode 100644
index 00000000..acad2ace
--- /dev/null
+++ b/tests/py/inet/socket.t.payload
@@ -0,0 +1,30 @@
+# socket transparent 0
+ip sockip4 sockchain
+ [ socket load transparent => reg 1 ]
+ [ cmp eq reg 1 0x00000000 ]
+
+# socket transparent 0
+ip6 sockip6 sockchain
+ [ socket load transparent => reg 1 ]
+ [ cmp eq reg 1 0x00000000 ]
+
+# socket transparent 0
+inet sockin sockchain
+ [ socket load transparent => reg 1 ]
+ [ cmp eq reg 1 0x00000000 ]
+
+# socket transparent 1
+ip sockip4 sockchain
+ [ socket load transparent => reg 1 ]
+ [ cmp eq reg 1 0x00000001 ]
+
+# socket transparent 1
+ip6 sockip6 sockchain
+ [ socket load transparent => reg 1 ]
+ [ cmp eq reg 1 0x00000001 ]
+
+# socket transparent 1
+inet sockin sockchain
+ [ socket load transparent => reg 1 ]
+ [ cmp eq reg 1 0x00000001 ]
+