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 --- src/parser_bison.y | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/parser_bison.y') 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; } -- cgit v1.2.3