]> git.ipfire.org Git - thirdparty/libnftnl.git/commitdiff
expr: log: fix typo in nftnl_expr_log_export
authorLiping Zhang <liping.zhang@spreadtrum.com>
Sun, 25 Sep 2016 08:54:33 +0000 (16:54 +0800)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 4 Oct 2016 06:49:50 +0000 (08:49 +0200)
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>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/expr/log.c

index 57490d9ba82d49f2b361c167ed12350181ceac85..e965448442b903d9f78a0fd5b73663b0f4b9b9cf 100644 (file)
@@ -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);
 }