diff options
author | Florian Westphal <fw@strlen.de> | 2021-11-21 23:32:57 +0100 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2021-12-01 14:11:39 +0100 |
commit | d59a09f33eb14c5a53535d4830a158568746babe (patch) | |
tree | 95e4f05ab4ecd55f0be02be06c79b9f82ccf31cd /src | |
parent | fa564b6ce7e595a11f27896e47dedc7b5af2e33d (diff) |
tcpopt: remove KIND keyword
tcp option <foo> kind ... never makes any sense, as "tcp option <foo>"
already tells the kernel to look for the foo <kind>.
"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 <fw@strlen.de>
Diffstat (limited to 'src')
-rw-r--r-- | src/parser_bison.y | 4 | ||||
-rw-r--r-- | src/scanner.l | 1 |
2 files changed, 1 insertions, 4 deletions
diff --git a/src/parser_bison.y b/src/parser_bison.y index 81d75ecb..bc5ec2e6 100644 --- a/src/parser_bison.y +++ b/src/parser_bison.y @@ -412,7 +412,6 @@ int nft_lex(void *, void *, void *); %token SACK3 "sack3" %token SACK_PERM "sack-permitted" %token TIMESTAMP "timestamp" -%token KIND "kind" %token COUNT "count" %token LEFT "left" %token RIGHT "right" @@ -5526,8 +5525,7 @@ tcp_hdr_option_type : EOL { $$ = TCPOPT_KIND_EOL; } } ; -tcp_hdr_option_field : KIND { $$ = TCPOPT_COMMON_KIND; } - | LENGTH { $$ = TCPOPT_COMMON_LENGTH; } +tcp_hdr_option_field : LENGTH { $$ = TCPOPT_COMMON_LENGTH; } | SIZE { $$ = TCPOPT_MAXSEG_SIZE; } | COUNT { $$ = TCPOPT_WINDOW_COUNT; } | LEFT { $$ = TCPOPT_SACK_LEFT; } diff --git a/src/scanner.l b/src/scanner.l index 6cc7778d..455ef99f 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -481,7 +481,6 @@ addrstring ({macaddr}|{ip4addr}|{ip6addr}) "timestamp" { return TIMESTAMP; } "time" { return TIME; } -"kind" { return KIND; } "count" { return COUNT; } "left" { return LEFT; } "right" { return RIGHT; } |