From 17841a1975cd1c4346f243144f775a8cb17c50b5 Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Tue, 8 Aug 2017 13:13:01 +0200 Subject: tests: add tcp option set support / tcp mss mangling test cases Signed-off-by: Florian Westphal Acked-by: Pablo Neira Ayuso --- tests/py/inet/rt.t | 4 +++- tests/py/inet/rt.t.payload | 5 +++++ tests/py/inet/tcpopt.t | 2 ++ tests/py/inet/tcpopt.t.payload | 5 +++++ 4 files changed, 15 insertions(+), 1 deletion(-) (limited to 'tests') 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 ] -- cgit v1.2.3