summaryrefslogtreecommitdiffstats
path: root/src/parser_bison.y
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2021-11-21 23:33:11 +0100
committerFlorian Westphal <fw@strlen.de>2021-12-01 14:11:39 +0100
commitfa86b544c03b14ea12f30ad39676a6fea88cbe05 (patch)
tree9bd1fb741fb95c84c06591fd1d5ddc8be10b7cac /src/parser_bison.y
parentc009df1fded60c64075493c875873f05606f17ef (diff)
tcpopt: add md5sig, fastopen and mptcp options
Allow to use "fastopen", "md5sig" and "mptcp" mnemonics rather than the raw option numbers. These new keywords are only recognized while scanner is in tcp state. Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'src/parser_bison.y')
-rw-r--r--src/parser_bison.y10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/parser_bison.y b/src/parser_bison.y
index fca79132..a6a591b7 100644
--- a/src/parser_bison.y
+++ b/src/parser_bison.y
@@ -408,6 +408,7 @@ int nft_lex(void *, void *, void *);
%token OPTION "option"
%token ECHO "echo"
%token EOL "eol"
+%token MPTCP "mptcp"
%token NOP "nop"
%token SACK "sack"
%token SACK0 "sack0"
@@ -415,6 +416,8 @@ int nft_lex(void *, void *, void *);
%token SACK2 "sack2"
%token SACK3 "sack3"
%token SACK_PERM "sack-permitted"
+%token FASTOPEN "fastopen"
+%token MD5SIG "md5sig"
%token TIMESTAMP "timestamp"
%token COUNT "count"
%token LEFT "left"
@@ -5548,11 +5551,14 @@ tcp_hdr_option_sack : SACK { $$ = TCPOPT_KIND_SACK; }
tcp_hdr_option_type : ECHO { $$ = TCPOPT_KIND_ECHO; }
| EOL { $$ = TCPOPT_KIND_EOL; }
+ | FASTOPEN { $$ = TCPOPT_KIND_FASTOPEN; }
+ | MD5SIG { $$ = TCPOPT_KIND_MD5SIG; }
+ | MPTCP { $$ = TCPOPT_KIND_MPTCP; }
| MSS { $$ = TCPOPT_KIND_MAXSEG; }
| NOP { $$ = TCPOPT_KIND_NOP; }
| SACK_PERM { $$ = TCPOPT_KIND_SACK_PERMITTED; }
- | TIMESTAMP { $$ = TCPOPT_KIND_TIMESTAMP; }
- | WINDOW { $$ = TCPOPT_KIND_WINDOW; }
+ | TIMESTAMP { $$ = TCPOPT_KIND_TIMESTAMP; }
+ | WINDOW { $$ = TCPOPT_KIND_WINDOW; }
| tcp_hdr_option_sack { $$ = $1; }
| NUM {
if ($1 > 255) {