]> git.ipfire.org Git - thirdparty/nftables.git/commit
evaluate: allow stateful statements with anonymous verdict maps
authorPablo Neira Ayuso <pablo@netfilter.org>
Sun, 7 May 2023 17:30:46 +0000 (19:30 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 10 May 2023 06:05:50 +0000 (08:05 +0200)
commitaceea86de797bcc315d3e759a44b97cbfb724435
treeea05149c15af3661b0b543608bcd9927c5b30756
parent0583bac241ea18c9d7f61cb20ca04faa1e043b78
evaluate: allow stateful statements with anonymous verdict maps

Evaluation fails to accept stateful statements in verdict maps, relax
the following check for anonymous sets:

test.nft:4:29-35: Error: missing statement in map declaration
                ip saddr vmap { 127.0.0.1 counter : drop, * counter : accept }
                                          ^^^^^^^

The existing code generates correctly the counter in the anonymous
verdict map.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/evaluate.c
tests/shell/testcases/maps/0009vmap_0
tests/shell/testcases/maps/dumps/0009vmap_0.nft