diff mbox

[libnftnl,1/3] expr: log: fix typo in nftnl_expr_log_export

Message ID 1474793675-4542-2-git-send-email-zlpnobody@163.com
State Accepted
Delegated to: Pablo Neira
Headers show

Commit Message

Liping Zhang Sept. 25, 2016, 8:54 a.m. UTC
From: Liping Zhang <liping.zhang@spreadtrum.com>

After test NFTNL_EXPR_LOG_FLAGS is set, we should put "log->flags"
instead of "log->level".

Signed-off-by: Liping Zhang <liping.zhang@spreadtrum.com>
---
 src/expr/log.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/src/expr/log.c b/src/expr/log.c
index 57490d9..e965448 100644
--- a/src/expr/log.c
+++ b/src/expr/log.c
@@ -264,7 +264,7 @@  static int nftnl_expr_log_export(char *buf, size_t size,
 	if (e->flags & (1 << NFTNL_EXPR_LOG_LEVEL))
 		nftnl_buf_u32(&b, type, log->level, LEVEL);
 	if (e->flags & (1 << NFTNL_EXPR_LOG_FLAGS))
-		nftnl_buf_u32(&b, type, log->level, FLAGS);
+		nftnl_buf_u32(&b, type, log->flags, FLAGS);
 
 	return nftnl_buf_done(&b);
 }