]> git.ipfire.org Git - thirdparty/nftables.git/commit
evaluate: missing object maps handling in list and flush commands
authorPablo Neira Ayuso <pablo@netfilter.org>
Thu, 11 Jul 2019 13:49:09 +0000 (15:49 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 16 Jul 2019 17:53:43 +0000 (19:53 +0200)
commit7d3c01182e883e18050903b9176593c517e4ff91
tree2cc24b204177e2192bbd6be3e8f2b8e5bd27c6d7
parent0fd53234e360d4dde8aa53dbcaad89495a4fab7f
evaluate: missing object maps handling in list and flush commands

NFT_SET_OBJECT tells there is an object map.

 # nft list ruleset
 table inet filter {
        map countermap {
                type ipv4_addr : counter
        }
 }

The following command fails:

 # nft flush set inet filter countermap

This patch checks for NFT_SET_OBJECT from new set_is_literal() and
map_is_literal() functions. This patch also adds tests for this.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/rule.h
src/evaluate.c
tests/shell/testcases/listing/0017objects_0 [new file with mode: 0755]
tests/shell/testcases/listing/0018data_0 [new file with mode: 0755]
tests/shell/testcases/listing/0019set_0 [new file with mode: 0755]