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 --- doc/payload-expression.txt | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) (limited to 'doc') diff --git a/doc/payload-expression.txt b/doc/payload-expression.txt index 930a1807..106ff74c 100644 --- a/doc/payload-expression.txt +++ b/doc/payload-expression.txt @@ -614,37 +614,37 @@ Segment Routing Header |Keyword| Description | TCP option fields |eol| End if option list| -kind +- |nop| 1 Byte TCP Nop padding option | -kind +- |maxseg| TCP Maximum Segment Size| -kind, length, size +length, size |window| TCP Window Scaling | -kind, length, count +length, count |sack-perm | TCP SACK permitted | -kind, length +length |sack| TCP Selective Acknowledgement (alias of block 0) | -kind, length, left, right +length, left, right |sack0| TCP Selective Acknowledgement (block 0) | -kind, length, left, right +length, left, right |sack1| TCP Selective Acknowledgement (block 1) | -kind, length, left, right +length, left, right |sack2| TCP Selective Acknowledgement (block 2) | -kind, length, left, right +length, left, right |sack3| TCP Selective Acknowledgement (block 3) | -kind, length, left, right +length, left, right |timestamp| TCP Timestamps | -kind, length, tsval, tsecr +length, tsval, tsecr |============================ TCP option matching also supports raw expression syntax to access arbitrary options: @@ -673,7 +673,12 @@ type, length, ptr, addr .finding TCP options -------------------- -filter input tcp option sack-perm kind 1 counter +filter input tcp option sack-perm exists counter +-------------------- + +.matching TCP options +-------------------- +filter input tcp option maxseg size lt 536 -------------------- .matching IPv6 exthdr -- cgit v1.2.3