summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/evaluate.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/evaluate.c b/src/evaluate.c
index 8f35ca59..02115101 100644
--- a/src/evaluate.c
+++ b/src/evaluate.c
@@ -3754,6 +3754,10 @@ static int set_evaluate(struct eval_ctx *ctx, struct set *set)
if (table == NULL)
return table_not_found(ctx);
+ if (!(set->flags & NFT_SET_ANONYMOUS) &&
+ !set_cache_find(table, set->handle.set.name))
+ set_cache_add(set_get(set), table);
+
if (!(set->flags & NFT_SET_INTERVAL) && set->automerge)
return set_error(ctx, set, "auto-merge only works with interval sets");