* [PATCH nft] log: netlink_linearize: don't set level if user didn't specify
@ 2014-09-11 16:45 Pablo Neira Ayuso
0 siblings, 0 replies; only message in thread
From: Pablo Neira Ayuso @ 2014-09-11 16:45 UTC (permalink / raw)
To: netfilter-devel; +Cc: kaber
The kernel will default on LOG_WARNING, to mimic iptables behaviour.
Reported-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
src/netlink_linearize.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/netlink_linearize.c b/src/netlink_linearize.c
index 5eecd79..17375a5 100644
--- a/src/netlink_linearize.c
+++ b/src/netlink_linearize.c
@@ -586,7 +586,10 @@ static void netlink_gen_log_stmt(struct netlink_linearize_ctx *ctx,
nft_rule_expr_set_u16(nle, NFT_EXPR_LOG_QTHRESHOLD,
stmt->log.qthreshold);
} else {
- nft_rule_expr_set_u32(nle, NFT_EXPR_LOG_LEVEL, stmt->log.level);
+ if (stmt->log.flags & STMT_LOG_LEVEL) {
+ nft_rule_expr_set_u32(nle, NFT_EXPR_LOG_LEVEL,
+ stmt->log.level);
+ }
}
nft_rule_add_expr(ctx->nlr, nle);
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-09-11 16:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-11 16:45 [PATCH nft] log: netlink_linearize: don't set level if user didn't specify Pablo Neira Ayuso
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).