summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2021-02-23 12:12:40 +0100
committerFlorian Westphal <fw@strlen.de>2021-02-23 12:12:49 +0100
commit4507148af780195dc93f6110b893181fd51d8b5e (patch)
tree002e82ca285f75d423c18b1ae37ba0b1a7acef11 /src
parent4ab1e5e6077918b5b0b4553daa907a725d4cd0fe (diff)
parser: re-enable support for concatentation on map RHS
"typeof .... : ip saddr . tcp dport" is legal. This makes 'testcases/maps/nat_addr_port' pass again. Fixes: 4ab1e5e6077918 ("src: allow use of 'verdict' in typeof definitions") Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'src')
-rw-r--r--src/parser_bison.y9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/parser_bison.y b/src/parser_bison.y
index 3c8013b2..2d5d8e48 100644
--- a/src/parser_bison.y
+++ b/src/parser_bison.y
@@ -1760,6 +1760,15 @@ typeof_data_expr : primary_expr
}
$$ = e;
}
+ | typeof_expr DOT primary_expr
+ {
+ struct location rhs[] = {
+ [1] = @2,
+ [2] = @3,
+ };
+
+ $$ = handle_concat_expr(&@$, $$, $1, $3, rhs);
+ }
;
typeof_expr : primary_expr