From d59a09f33eb14c5a53535d4830a158568746babe Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Sun, 21 Nov 2021 23:32:57 +0100 Subject: tcpopt: remove KIND keyword tcp option kind ... never makes any sense, as "tcp option " already tells the kernel to look for the foo . "tcp option sack kind 5" matches if the sack option is present; its a more complicated form of the simpler "tcp option sack exists". "tcp option sack kind 1" (or any other value than 5) will never match. So remove this. Test cases are converted to "exists". Signed-off-by: Florian Westphal --- tests/py/any/tcpopt.t.json | 63 +++++++++++++++------------------------------- 1 file changed, 20 insertions(+), 43 deletions(-) (limited to 'tests/py/any/tcpopt.t.json') diff --git a/tests/py/any/tcpopt.t.json b/tests/py/any/tcpopt.t.json index a45b4c8b..5468accb 100644 --- a/tests/py/any/tcpopt.t.json +++ b/tests/py/any/tcpopt.t.json @@ -1,47 +1,44 @@ -# tcp option eol kind 1 +# tcp option eol exists [ { "match": { "left": { "tcp option": { - "field": "kind", "name": "eol" } }, "op": "==", - "right": 1 + "right": true } } ] -# tcp option nop kind 1 +# tcp option nop exists [ { "match": { "left": { "tcp option": { - "field": "kind", "name": "nop" } }, "op": "==", - "right": 1 + "right": true } } ] -# tcp option maxseg kind 1 +# tcp option maxseg exists [ { "match": { "left": { "tcp option": { - "field": "kind", "name": "maxseg" } }, "op": "==", - "right": 1 + "right": true } } ] @@ -78,22 +75,6 @@ } ] -# tcp option window kind 1 -[ - { - "match": { - "left": { - "tcp option": { - "field": "kind", - "name": "window" - } - }, - "op": "==", - "right": 1 - } - } -] - # tcp option window length 1 [ { @@ -126,18 +107,17 @@ } ] -# tcp option sack-perm kind 1 +# tcp option sack-perm exists [ { "match": { "left": { "tcp option": { - "field": "kind", "name": "sack-perm" } }, "op": "==", - "right": 1 + "right": true } } ] @@ -158,18 +138,17 @@ } ] -# tcp option sack kind 1 +# tcp option sack exists [ { "match": { "left": { "tcp option": { - "field": "kind", "name": "sack" } }, "op": "==", - "right": 1 + "right": true } } ] @@ -213,7 +192,7 @@ "left": { "tcp option": { "field": "left", - "name": "sack0" + "name": "sack" } }, "op": "==", @@ -293,7 +272,7 @@ "left": { "tcp option": { "field": "right", - "name": "sack0" + "name": "sack" } }, "op": "==", @@ -350,18 +329,17 @@ } ] -# tcp option timestamp kind 1 +# tcp option timestamp exists [ { "match": { "left": { "tcp option": { - "field": "kind", "name": "timestamp" } }, "op": "==", - "right": 1 + "right": true } } ] @@ -414,36 +392,36 @@ } ] -# tcp option 6 exists +# tcp option 255 missing [ { "match": { "left": { "tcp option": { - "base": 6, + "base": 255, "len": 8, "offset": 0 } }, "op": "==", - "right": true + "right": false } } ] -# tcp option 255 missing +# tcp option 6 exists [ { "match": { "left": { "tcp option": { - "base": 255, + "base": 6, "len": 8, "offset": 0 } }, "op": "==", - "right": false + "right": true } } ] @@ -509,4 +487,3 @@ } } ] - -- cgit v1.2.3