netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "谢致邦 (XIE Zhibang)" <Yeking@Red54.com>
To: netfilter-devel@vger.kernel.org
Cc: "谢致邦 (XIE Zhibang)" <Yeking@Red54.com>
Subject: [nft PATCH v2] evaluate: fix check for unknown in cmd_op_to_name
Date: Wed,  7 Feb 2024 12:27:57 +0000	[thread overview]
Message-ID: <tencent_4CE98729F09EB6B547CF9AE06FF119AF7D05@qq.com> (raw)

Example:
nft --debug=all destroy table ip missingtable

Before:
Evaluate unknown

After:
Evaluate destroy

Fixes: e1dfd5cc4c46 ("src: add support to command "destroy"")
Signed-off-by: 谢致邦 (XIE Zhibang) <Yeking@Red54.com>
---
V1 -> V2: Update subject and message

 src/evaluate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/evaluate.c b/src/evaluate.c
index 68cfd7765381..57da4044e8c0 100644
--- a/src/evaluate.c
+++ b/src/evaluate.c
@@ -6048,7 +6048,7 @@ static const char * const cmd_op_name[] = {
 
 static const char *cmd_op_to_name(enum cmd_ops op)
 {
-	if (op > CMD_DESCRIBE)
+	if (op > CMD_DESTROY)
 		return "unknown";
 
 	return cmd_op_name[op];
-- 
2.43.0


             reply	other threads:[~2024-02-07 12:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-07 12:27 谢致邦 (XIE Zhibang) [this message]
2024-02-07 13:09 ` [nft PATCH v2] evaluate: fix check for unknown in cmd_op_to_name Phil Sutter

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=tencent_4CE98729F09EB6B547CF9AE06FF119AF7D05@qq.com \
    --to=yeking@red54.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).