[PATCH libnftnl] expr: dup: Fix json parsing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
Cc: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux