From 4507148af780195dc93f6110b893181fd51d8b5e Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Tue, 23 Feb 2021 12:12:40 +0100 Subject: 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 --- src/parser_bison.y | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/parser_bison.y') 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 -- cgit v1.2.3