]> git.ipfire.org Git - thirdparty/nftables.git/commit
evaluate: error reporting for missing statements in set/map declaration
authorPablo Neira Ayuso <pablo@netfilter.org>
Mon, 26 Jul 2021 16:00:09 +0000 (18:00 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 26 Jul 2021 16:21:19 +0000 (18:21 +0200)
commit435440babe42a9fac2172547dfed3e0418e0d803
tree2dd69d41b87007d18f48b14d31b1943b5c139da0
parent08d2f049367153d2c3b03c95b2ca7256cdf3521d
evaluate: error reporting for missing statements in set/map declaration

Assuming this map:

        map y {
                type ipv4_addr : verdict
        }

This patch slightly improves error reporting to refer to the missing
'counter' statement in the map declaration.

 # nft 'add element x y { 1.2.3.4 counter packets 1 bytes 1 : accept, * counter : drop }'
 Error: missing statement in map declaration
 add element x y { 1.2.3.4 counter packets 10 bytes 640 : accept, * counter : drop }
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/evaluate.c