netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Aaron Conole <aconole@bytheb.org>
To: netfilter-devel@vger.kernel.org
Cc: Aaron Conole <aconole@bytheb.org>,
	Pablo Neira Ayuso <pablo@netfilter.org>
Subject: [PATCH libnftnl] expr: dup: Fix json parsing
Date: Thu,  8 Oct 2015 17:09:30 -0400	[thread overview]
Message-ID: <1444338570-9254-1-git-send-email-aconole@bytheb.org> (raw)

fixes 760768890e60 ("src: rename existing functions...") by using the
correct NFTNL_TYPE_U32.
fixes 42365e5fec55 ("expr: add dup expression support...") by adding
a declaration for the ret variable.

Signed-off-by: Aaron Conole <aconole@bytheb.org>
Cc: Pablo Neira Ayuso <pablo@netfilter.org>
---
 src/expr/dup.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/expr/dup.c b/src/expr/dup.c
index d0fa35f..17957df 100644
--- a/src/expr/dup.c
+++ b/src/expr/dup.c
@@ -119,10 +119,10 @@ static int nftnl_expr_dup_json_parse(struct nftnl_expr *e, json_t *root,
 	uint32_t sreg_addr, sreg_dev;
 	int datareg_type;
 
-	ret = nftnl_jansson_parse_val(root, "sreg_addr", NFT_TYPE_U32, &sreg_addr, err);
+	int ret = nftnl_jansson_parse_val(root, "sreg_addr", NFTNL_TYPE_U32, &sreg_addr, err);
 	if (ret >= 0)
 		nftnl_expr_set_u32(e, NFTNL_EXPR_DUP_SREG_DEV, sreg_addr);
-	ret = nftnl_jansson_parse_val(root, "sreg_dev", NFT_TYPE_U32, &sreg_dev, err);
+	ret = nftnl_jansson_parse_val(root, "sreg_dev", NFTNL_TYPE_U32, &sreg_dev, err);
 	if (ret >= 0)
 		nftnl_expr_set_u32(e, NFTNL_EXPR_DUP_SREG_DEV, sreg_dev);
 
-- 
1.8.3.1


             reply	other threads:[~2015-10-08 21:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-08 21:09 Aaron Conole [this message]
2015-10-12 15:55 ` [PATCH libnftnl] expr: dup: Fix json parsing 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=1444338570-9254-1-git-send-email-aconole@bytheb.org \
    --to=aconole@bytheb.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.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).