summaryrefslogtreecommitdiffstats
path: root/src/evaluate.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2021-04-15 14:00:20 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2021-05-02 23:30:35 +0200
commit3f7c14f6e0fdda1d49d5d84d914759e9b33690b6 (patch)
treec158a7b2276abcf27ad22b864051e87ed347ef67 /src/evaluate.c
parent67d3969a72443c228b8fc198e42c7c508dbfe41a (diff)
evaluate: add flowtable to the cache
If the cache does not contain this flowtable that is defined in this batch, then add it to the cache. This allows for references to this new flowtable in the same batch. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/evaluate.c')
-rw-r--r--src/evaluate.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/evaluate.c b/src/evaluate.c
index 02115101..f4c1acef 100644
--- a/src/evaluate.c
+++ b/src/evaluate.c
@@ -3961,6 +3961,9 @@ static int flowtable_evaluate(struct eval_ctx *ctx, struct flowtable *ft)
if (table == NULL)
return table_not_found(ctx);
+ if (!ft_cache_find(table, ft->handle.flowtable.name))
+ ft_cache_add(flowtable_get(ft), table);
+
if (ft->hook.name) {
ft->hook.num = str2hooknum(NFPROTO_NETDEV, ft->hook.name);
if (ft->hook.num == NF_INET_NUMHOOKS)