From 2a9aea6f2dfb6ee61528809af98860e06b38762b Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Mon, 2 Nov 2020 00:27:04 +0100 Subject: parser: merge sack-perm/sack-permitted and maxseg/mss One was added by the tcp option parsing ocde, the other by synproxy. So we have: synproxy ... sack-perm synproxy ... mss and tcp option maxseg tcp option sack-permitted This kills the extra tokens on the scanner/parser side, so sack-perm and sack-permitted can both be used. Likewise, 'synproxy maxseg' and 'tcp option mss size 42' will work too. On the output side, the shorter form is now preferred, i.e. sack-perm and mss. Signed-off-by: Florian Westphal --- tests/py/any/tcpopt.t | 4 ++-- tests/py/any/tcpopt.t.json | 8 ++++---- tests/py/any/tcpopt.t.payload | 12 ++++++------ 3 files changed, 12 insertions(+), 12 deletions(-) (limited to 'tests') diff --git a/tests/py/any/tcpopt.t b/tests/py/any/tcpopt.t index 08b1dcb3..5f21d498 100644 --- a/tests/py/any/tcpopt.t +++ b/tests/py/any/tcpopt.t @@ -12,8 +12,8 @@ tcp option maxseg size 1;ok tcp option window kind 1;ok tcp option window length 1;ok tcp option window count 1;ok -tcp option sack-permitted kind 1;ok -tcp option sack-permitted length 1;ok +tcp option sack-perm kind 1;ok +tcp option sack-perm length 1;ok tcp option sack kind 1;ok tcp option sack length 1;ok tcp option sack left 1;ok diff --git a/tests/py/any/tcpopt.t.json b/tests/py/any/tcpopt.t.json index 48eb339c..2c6236a1 100644 --- a/tests/py/any/tcpopt.t.json +++ b/tests/py/any/tcpopt.t.json @@ -126,14 +126,14 @@ } ] -# tcp option sack-permitted kind 1 +# tcp option sack-perm kind 1 [ { "match": { "left": { "tcp option": { "field": "kind", - "name": "sack-permitted" + "name": "sack-perm" } }, "op": "==", @@ -142,14 +142,14 @@ } ] -# tcp option sack-permitted length 1 +# tcp option sack-perm length 1 [ { "match": { "left": { "tcp option": { "field": "length", - "name": "sack-permitted" + "name": "sack-perm" } }, "op": "==", diff --git a/tests/py/any/tcpopt.t.payload b/tests/py/any/tcpopt.t.payload index 63751cf2..f63076ae 100644 --- a/tests/py/any/tcpopt.t.payload +++ b/tests/py/any/tcpopt.t.payload @@ -166,42 +166,42 @@ inet [ exthdr load tcpopt 1b @ 3 + 2 => reg 1 ] [ cmp eq reg 1 0x00000001 ] -# tcp option sack-permitted kind 1 +# tcp option sack-perm kind 1 ip [ meta load l4proto => reg 1 ] [ cmp eq reg 1 0x00000006 ] [ exthdr load tcpopt 1b @ 4 + 0 => reg 1 ] [ cmp eq reg 1 0x00000001 ] -# tcp option sack-permitted kind 1 +# tcp option sack-perm kind 1 ip6 [ meta load l4proto => reg 1 ] [ cmp eq reg 1 0x00000006 ] [ exthdr load tcpopt 1b @ 4 + 0 => reg 1 ] [ cmp eq reg 1 0x00000001 ] -# tcp option sack-permitted kind 1 +# tcp option sack-perm kind 1 inet [ meta load l4proto => reg 1 ] [ cmp eq reg 1 0x00000006 ] [ exthdr load tcpopt 1b @ 4 + 0 => reg 1 ] [ cmp eq reg 1 0x00000001 ] -# tcp option sack-permitted length 1 +# tcp option sack-perm length 1 ip [ meta load l4proto => reg 1 ] [ cmp eq reg 1 0x00000006 ] [ exthdr load tcpopt 1b @ 4 + 1 => reg 1 ] [ cmp eq reg 1 0x00000001 ] -# tcp option sack-permitted length 1 +# tcp option sack-perm length 1 ip6 [ meta load l4proto => reg 1 ] [ cmp eq reg 1 0x00000006 ] [ exthdr load tcpopt 1b @ 4 + 1 => reg 1 ] [ cmp eq reg 1 0x00000001 ] -# tcp option sack-permitted length 1 +# tcp option sack-perm length 1 inet [ meta load l4proto => reg 1 ] [ cmp eq reg 1 0x00000006 ] -- cgit v1.2.3