]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
tests: add tcp option set support / tcp mss mangling test cases
authorFlorian Westphal <fw@strlen.de>
Tue, 8 Aug 2017 11:13:01 +0000 (13:13 +0200)
committerFlorian Westphal <fw@strlen.de>
Tue, 22 Aug 2017 21:51:09 +0000 (23:51 +0200)
Signed-off-by: Florian Westphal <fw@strlen.de>
Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
tests/py/inet/rt.t
tests/py/inet/rt.t.payload
tests/py/inet/tcpopt.t
tests/py/inet/tcpopt.t.payload

index f2dcbdc41da9fdb7eeecadd9c40529775883f66b..9543738b786cf3530e261d36b0d81cb6ee09a82b 100644 (file)
@@ -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
index d94973e03ffaac03829352708f21d2179a6ba904..2f6265ed640a5dfa569fc384b477178f79c3d64b 100644 (file)
@@ -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 ]
+
index a42ecd250a9c168c316f3048df1aaa779705378f..b457691f7f27a9fc926a300a703fa3e52478e7ea 100644 (file)
@@ -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
index 10cf0c00f402f988980d3341cccd3119bf70d543..7e254ed3f6056be6e346c4fcf16ff24d7d4d2aa6 100644 (file)
@@ -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 ]