All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laura Garcia <nevola@gmail.com>
To: Liping Zhang <zlpnobody@163.com>
Cc: pablo@netfilter.org, netfilter-devel@vger.kernel.org,
	Liping Zhang <liping.zhang@spreadtrum.com>
Subject: Re: [PATCH nft] src: fix compile error due to _UNTIL renamed to _MODULUS in libnftnl
Date: Mon, 12 Sep 2016 11:49:20 +0200	[thread overview]
Message-ID: <20160912094919.GA5013@sonyv> (raw)
In-Reply-To: <1473582957-52218-1-git-send-email-zlpnobody@163.com>

On Sun, Sep 11, 2016 at 04:35:57PM +0800, Liping Zhang wrote:
> 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)
> 

In order to complete the renaming, NFTA_NG_UNTIL should be changed to
NFTA_NG_MODULUS as well.

> 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
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2016-09-12  9:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2016-09-12  9:58   ` Liping Zhang

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=20160912094919.GA5013@sonyv \
    --to=nevola@gmail.com \
    --cc=liping.zhang@spreadtrum.com \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    --cc=zlpnobody@163.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.