summaryrefslogtreecommitdiffstats
path: root/tests/py
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2017-08-08 13:13:01 +0200
committerFlorian Westphal <fw@strlen.de>2017-08-22 23:51:09 +0200
commit17841a1975cd1c4346f243144f775a8cb17c50b5 (patch)
treec5665cd2b719417cd7081a787b75aacec6229571 /tests/py
parent444ac7bee1452cdf59ec44400db210423052d109 (diff)
tests: add tcp option set support / tcp mss mangling test cases
Signed-off-by: Florian Westphal <fw@strlen.de> Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/py')
-rw-r--r--tests/py/inet/rt.t4
-rw-r--r--tests/py/inet/rt.t.payload5
-rw-r--r--tests/py/inet/tcpopt.t2
-rw-r--r--tests/py/inet/tcpopt.t.payload5
4 files changed, 15 insertions, 1 deletions
diff --git a/tests/py/inet/rt.t b/tests/py/inet/rt.t
index f2dcbdc4..9543738b 100644
--- a/tests/py/inet/rt.t
+++ b/tests/py/inet/rt.t
@@ -1,4 +1,4 @@
-:output;type filter hook input priority 0
+:output;type filter hook output priority 0
*inet;test-inet;output
@@ -6,3 +6,5 @@ rt nexthop 192.168.0.1;fail
rt nexthop fd00::1;fail
meta nfproto ipv4 rt nexthop 192.168.0.1;ok
meta nfproto ipv6 rt nexthop fd00::1;ok
+
+tcp option maxseg size set rt mtu;ok
diff --git a/tests/py/inet/rt.t.payload b/tests/py/inet/rt.t.payload
index d94973e0..2f6265ed 100644
--- a/tests/py/inet/rt.t.payload
+++ b/tests/py/inet/rt.t.payload
@@ -12,3 +12,8 @@ inet test-inet output
[ rt load nexthop6 => reg 1 ]
[ cmp eq reg 1 0x000000fd 0x00000000 0x00000000 0x01000000 ]
+# tcp option maxseg size set rt mtu
+inet test-inet output
+ [ rt load tcpmss => reg 1 ]
+ [ exthdr write tcpopt reg 1 => 2b @ 2 + 2 ]
+
diff --git a/tests/py/inet/tcpopt.t b/tests/py/inet/tcpopt.t
index a42ecd25..b457691f 100644
--- a/tests/py/inet/tcpopt.t
+++ b/tests/py/inet/tcpopt.t
@@ -38,3 +38,5 @@ tcp option sack window 1;fail
tcp option window exists;ok
tcp option window missing;ok
+
+tcp option maxseg size set 1360;ok
diff --git a/tests/py/inet/tcpopt.t.payload b/tests/py/inet/tcpopt.t.payload
index 10cf0c00..7e254ed3 100644
--- a/tests/py/inet/tcpopt.t.payload
+++ b/tests/py/inet/tcpopt.t.payload
@@ -193,3 +193,8 @@ inet test-inet input
[ cmp eq reg 1 0x00000006 ]
[ exthdr load tcpopt 1b @ 3 + 0 present => reg 1 ]
[ cmp eq reg 1 0x00000000 ]
+
+# tcp option maxseg size set 1360
+inet test-inet input
+ [ immediate reg 1 0x00005005 ]
+ [ exthdr write tcpopt reg 1 => 2b @ 2 + 2 ]