diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2019-03-06 11:56:59 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2019-03-06 12:01:42 +0100 |
commit | d34a6bacc6be36388a72350fe3c9e0d9ce81ac5a (patch) | |
tree | 573207e9594c53a8846e1e99adc38ab5ba19f2b3 /tests/shell/testcases/transactions/0043set_1 | |
parent | b1436403417697b8647956ff91d40a5982aba477 (diff) |
evaluate: misleading error reporting with sets and maps
When trying to list a map content, if set is used, nft reports:
# nft list set filter group_7933
Error: No such file or directory; did you mean set ‘group_7933’ in table ip ‘filter’?
list set filter group_7933
^^^^^^^^^^
Which is confusing in case user wants to list an existing map:
# nft list map filter group_7933
table ip filter {
map group_7933 {
type ipv4_addr : classid
flags interval
elements = { 10.4.22.0/24 : 1:c7cb }
}
}
Instead, give a hint to user that probably wants to list a map, not a set:
# nft list set filter group_7933
Error: No such file or directory; did you mean map ‘group_7933’ in table ip ‘filter’?
list set filter group_7933
^^^^^^^^^^
Fixes: 285bb67a11ad ("src: introduce simple hints on incorrect set")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/shell/testcases/transactions/0043set_1')
0 files changed, 0 insertions, 0 deletions