diff options
authorPablo M. Bermudo Garay <>2016-06-01 12:16:51 +0200
committerPablo Neira Ayuso <>2016-06-01 13:09:32 +0200
commit78ce38dd7eb3196bcdf227f128890f9ba9a347d2 (patch)
parent779f74ea067f970b90939b6df43ed2b60df58867 (diff)
evaluate: fix "list set" unexpected behaviour
Special sets like maps and flow tables have their own commands to be listed and inspected. Before this patch, "nft list set" was able to display these special sets content: # nft list set filter test table ip filter { map test { type ipv4_addr : inet_service elements = { : http-alt} } } Now an error is shown: # nft list set filter test <cmdline>:1:1-20: Error: Could not process rule: Set 'test' does not exist list set filter test ^^^^^^^^^^^^^^^^^^^^ Signed-off-by: Pablo M. Bermudo Garay <> Signed-off-by: Pablo Neira Ayuso <>
1 files changed, 2 insertions, 1 deletions
diff --git a/src/evaluate.c b/src/evaluate.c
index 423523fe..f24e5f3e 100644
--- a/src/evaluate.c
+++ b/src/evaluate.c
@@ -2674,7 +2674,8 @@ static int cmd_evaluate_list(struct eval_ctx *ctx, struct cmd *cmd)
if (table == NULL)
return cmd_error(ctx, "Could not process rule: Table '%s' does not exist",
- if (set_lookup(table, cmd->handle.set) == NULL)
+ set = set_lookup(table, cmd->handle.set);
+ if (set == NULL || set->flags & (SET_F_MAP | SET_F_EVAL))
return cmd_error(ctx, "Could not process rule: Set '%s' does not exist",
return 0;