summaryrefslogtreecommitdiffstats
path: root/src/rule.c
diff options
context:
space:
mode:
authorDuncan Roe <duncan_roe@optusnet.com.au>2018-04-26 09:23:49 +1000
committerFlorian Westphal <fw@strlen.de>2018-04-26 01:34:45 +0200
commit8810a28d381580b8f9cce393481e83faf4f43f6e (patch)
treee043713a91af0de6c0a4d7edd7c979283fb7547a /src/rule.c
parent45172efadbedee2b2dedc1e771046cca7edb0111 (diff)
src: fix --debug mnl not producing output
cache_update() needs to accept the full debug mask instead of a boolean of NFT_DEBUG_NETLINK, because called functions may wish to check other bits (NFT_DEBUG_MNL in particular). Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'src/rule.c')
-rw-r--r--src/rule.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rule.c b/src/rule.c
index e0e06c52..f8a27570 100644
--- a/src/rule.c
+++ b/src/rule.c
@@ -143,7 +143,7 @@ static int cache_init(struct netlink_ctx *ctx, enum cmd_ops cmd)
}
int cache_update(struct mnl_socket *nf_sock, struct nft_cache *cache,
- enum cmd_ops cmd, struct list_head *msgs, bool debug,
+ enum cmd_ops cmd, struct list_head *msgs, unsigned int debug_mask,
struct output_ctx *octx)
{
uint16_t genid;
@@ -153,7 +153,7 @@ int cache_update(struct mnl_socket *nf_sock, struct nft_cache *cache,
.nf_sock = nf_sock,
.cache = cache,
.msgs = msgs,
- .debug_mask = debug ? NFT_DEBUG_NETLINK : 0,
+ .debug_mask = debug_mask,
.octx = octx,
};