From: Florian Westphal <fw@strlen.de>
To: <netfilter-devel@vger.kernel.org>
Cc: Florian Westphal <fw@strlen.de>
Subject: [PATCH nft] rule: fix netlink debug flag when listing table/rules
Date: Thu, 19 Oct 2017 01:06:07 +0200 [thread overview]
Message-ID: <20171018230607.22375-1-fw@strlen.de> (raw)
nft --debug=netlink list table ...
has no effect anymore.
Callers pass in debug_mask & DEBUG_NETLINK, which gets converted
to 0/1 because the arg is a boolean.
Later on this bool is converted back to an integer, but that
won't have the desired result.
Fixes: be441e1ffdc24 ("src: add debugging mask to context structure")
Signed-off-by: Florian Westphal <fw@strlen.de>
---
src/rule.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/rule.c b/src/rule.c
index d744cf611100..d83284e5414f 100644
--- a/src/rule.c
+++ b/src/rule.c
@@ -123,7 +123,7 @@ static int cache_init_objects(struct netlink_ctx *ctx, enum cmd_ops cmd)
static int cache_init(struct mnl_socket *nf_sock, struct nft_cache *cache,
enum cmd_ops cmd, struct list_head *msgs,
- unsigned int debug_mask, struct output_ctx *octx)
+ bool debug, struct output_ctx *octx)
{
struct handle handle = {
.family = NFPROTO_UNSPEC,
@@ -134,7 +134,7 @@ static int cache_init(struct mnl_socket *nf_sock, struct nft_cache *cache,
.cache = cache,
.msgs = msgs,
.seqnum = cache->seqnum++,
- .debug_mask = debug_mask,
+ .debug_mask = debug ? DEBUG_NETLINK : 0,
.octx = octx,
};
int ret;
--
2.13.6
next reply other threads:[~2017-10-18 23:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-18 23:06 Florian Westphal [this message]
2017-10-19 9:56 ` [PATCH nft] rule: fix netlink debug flag when listing table/rules 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=20171018230607.22375-1-fw@strlen.de \
--to=fw@strlen.de \
--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).