From: Florian Westphal Date: Tue, 23 Feb 2021 11:12:40 +0000 (+0100) Subject: parser: re-enable support for concatentation on map RHS X-Git-Tag: v0.9.9~115 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4507148af780195dc93f6110b893181fd51d8b5e;p=thirdparty%2Fnftables.git 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 --- 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