netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH nft] src: fix compile error due to _UNTIL renamed to _MODULUS in libnftnl
@ 2016-09-11  8:35 Liping Zhang
  2016-09-12  9:49 ` Laura Garcia
  0 siblings, 1 reply; 3+ messages in thread
From: Liping Zhang @ 2016-09-11  8:35 UTC (permalink / raw)
  To: pablo; +Cc: netfilter-devel, Liping Zhang

From: Liping Zhang <liping.zhang@spreadtrum.com>

In the latest libnftnl, NFTNL_EXPR_NG_UNTIL was renamed to
NFTNL_EXPR_NG_MODULUS, so compile error happened:
  netlink_linearize.c: In function ‘netlink_gen_numgen’:
  netlink_linearize.c:184:26: error: ‘NFTNL_EXPR_NG_UNTIL’ undeclared
  (first use in this function)

Signed-off-by: Liping Zhang <liping.zhang@spreadtrum.com>
---
 src/netlink_delinearize.c | 2 +-
 src/netlink_linearize.c   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/netlink_delinearize.c b/src/netlink_delinearize.c
index 05edb01..6bb27b6 100644
--- a/src/netlink_delinearize.c
+++ b/src/netlink_delinearize.c
@@ -554,7 +554,7 @@ static void netlink_parse_numgen(struct netlink_parse_ctx *ctx,
 	struct expr *expr;
 
 	type  = nftnl_expr_get_u32(nle, NFTNL_EXPR_NG_TYPE);
-	until = nftnl_expr_get_u32(nle, NFTNL_EXPR_NG_UNTIL);
+	until = nftnl_expr_get_u32(nle, NFTNL_EXPR_NG_MODULUS);
 
 	expr = numgen_expr_alloc(loc, type, until);
 	dreg = netlink_parse_register(nle, NFTNL_EXPR_NG_DREG);
diff --git a/src/netlink_linearize.c b/src/netlink_linearize.c
index 5204154..558deb2 100644
--- a/src/netlink_linearize.c
+++ b/src/netlink_linearize.c
@@ -181,7 +181,7 @@ static void netlink_gen_numgen(struct netlink_linearize_ctx *ctx,
 	nle = alloc_nft_expr("numgen");
 	netlink_put_register(nle, NFTNL_EXPR_NG_DREG, dreg);
 	netlink_put_register(nle, NFTNL_EXPR_NG_TYPE, expr->numgen.type);
-	nftnl_expr_set_u32(nle, NFTNL_EXPR_NG_UNTIL, expr->numgen.mod);
+	nftnl_expr_set_u32(nle, NFTNL_EXPR_NG_MODULUS, expr->numgen.mod);
 	nftnl_rule_add_expr(ctx->nlr, nle);
 }
 
-- 
2.5.5



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-09-12  9:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-11  8:35 [PATCH nft] src: fix compile error due to _UNTIL renamed to _MODULUS in libnftnl Liping Zhang
2016-09-12  9:49 ` Laura Garcia
2016-09-12  9:58   ` Liping Zhang

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).