]> git.ipfire.org Git - thirdparty/nftables.git/commit
src: allow use of 'verdict' in typeof definitions
authorFlorian Westphal <fw@strlen.de>
Sat, 30 Jan 2021 18:58:42 +0000 (19:58 +0100)
committerFlorian Westphal <fw@strlen.de>
Mon, 22 Feb 2021 13:57:49 +0000 (14:57 +0100)
commit4ab1e5e6077918b5b0b4553daa907a725d4cd0fe
tree21bb70c5b86ad2d89372c7a7374637886ae19f02
parentb9e871cb6f5bf17376955acff55bce264e8355aa
src: allow use of 'verdict' in typeof definitions

'verdict' cannot be used as part of a map typeof-based key definition,
its a datatype and not an expression, e.g.:

  typeof iifname . ip protocol . th dport : verdic

... will fail.

Make the parser convert a 'verdict' symbol to a verdict expression
and allow to store its presence as part of the typeof key definition.

Reported-by: Frank Myhr <fmyhr@fhmtech.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
src/expression.c
src/parser_bison.y
tests/shell/testcases/maps/dumps/typeof_maps_0.nft
tests/shell/testcases/maps/typeof_maps_0