diff options
| author | Pablo Neira Ayuso <pablo@netfilter.org> | 2024-08-15 12:47:54 +0200 |
|---|---|---|
| committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2024-08-19 17:30:22 +0200 |
| commit | ba13acf4be081129d5c943db9f607a13954be5f6 (patch) | |
| tree | f4a817ec1ec0740fcc47c11fc3097689d08e70fe /src/cmd.c | |
| parent | 52d99078521f0ae245ad0145348bebdba9f665ab (diff) | |
cache: do not fetch set inconditionally on delete
This is only required to remove elements, relax cache requirements for
anything else.
Tested-by: Eric Garver <eric@garver.life>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/cmd.c')
| -rw-r--r-- | src/cmd.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -140,6 +140,10 @@ static int nft_cmd_enoent_set(struct netlink_ctx *ctx, const struct cmd *cmd, if (!cmd->handle.set.name) return 0; + if (nft_cache_update(ctx->nft, NFT_CACHE_TABLE | NFT_CACHE_SET, + ctx->msgs, NULL) < 0) + return 0; + set = set_lookup_fuzzy(cmd->handle.set.name, &ctx->nft->cache, &table); /* check table first. */ if (!table) |
