From: Pablo Neira Ayuso <pablo@netfilter.org>
To: netfilter-devel@vger.kernel.org
Cc: eric@garver.life
Subject: [PATCH nft 2/5] cache: clean up evaluate_cache_del()
Date: Thu, 29 Aug 2024 13:31:50 +0200 [thread overview]
Message-ID: <20240829113153.1553089-2-pablo@netfilter.org> (raw)
In-Reply-To: <20240829113153.1553089-1-pablo@netfilter.org>
Move NFT_CACHE_TABLE flag to default case to disentangle this.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
src/cache.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/cache.c b/src/cache.c
index 8cddabdb7b98..bed98bb71655 100644
--- a/src/cache.c
+++ b/src/cache.c
@@ -77,6 +77,7 @@ static unsigned int evaluate_cache_del(struct cmd *cmd, unsigned int flags)
NFT_CACHE_SETELEM_MAYBE;
break;
default:
+ flags = NFT_CACHE_TABLE;
break;
}
@@ -500,8 +501,6 @@ int nft_cache_evaluate(struct nft_ctx *nft, struct list_head *cmds,
break;
case CMD_DELETE:
case CMD_DESTROY:
- flags |= NFT_CACHE_TABLE;
-
flags = evaluate_cache_del(cmd, flags);
break;
case CMD_GET:
--
2.30.2
next prev parent reply other threads:[~2024-08-29 11:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-29 11:31 [PATCH nft 1/5] cache: assert filter when calling nft_cache_evaluate() Pablo Neira Ayuso
2024-08-29 11:31 ` Pablo Neira Ayuso [this message]
2024-08-29 11:31 ` [PATCH nft 3/5] cache: remove full cache requirement when echo flag is set on Pablo Neira Ayuso
2024-08-29 11:31 ` [PATCH nft 4/5] cache: relax requirement for replace rule command Pablo Neira Ayuso
2024-08-29 11:31 ` [PATCH nft 5/5] cache: position does not require full cache Pablo Neira Ayuso
2024-08-29 14:35 ` [PATCH nft 1/5] cache: assert filter when calling nft_cache_evaluate() Eric Garver
2024-08-30 10:38 ` Pablo Neira Ayuso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240829113153.1553089-2-pablo@netfilter.org \
--to=pablo@netfilter.org \
--cc=eric@garver.life \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.