From: Patrick McHardy <kaber@trash.net>
To: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
Cc: Pablo Neira Ayuso <pablo@netfilter.org>,
Netfilter Development Mailing list
<netfilter-devel@vger.kernel.org>
Subject: Re: [PATCH 09/12] netlink_delinearize: remove implied meta expressions
Date: Thu, 9 Jan 2014 22:01:07 +0000 [thread overview]
Message-ID: <20140109220106.GA11124@macbook.localnet> (raw)
In-Reply-To: <CAOkSjBh-eVG_EaTc+v7R4X_9584aBLTd1kL-5CL+joqTzK9eTA@mail.gmail.com>
On Thu, Jan 09, 2014 at 10:48:41PM +0100, Arturo Borrero Gonzalez wrote:
> On 8 January 2014 14:09, Patrick McHardy <kaber@trash.net> wrote:
> >
> > -static void meta_match_postprocess(struct proto_ctx *ctx,
> > +static void meta_match_postprocess(struct rule_pp_ctx *ctx,
> > + struct stmt *stmt,
> > const struct expr *expr)
>
> Hi Patrick,
>
> I noticed something. When compiling here, I get:
>
> $ make clean && make -j8
> [...]
> src/netlink_delinearize.c: In function ‘meta_match_postprocess’:
> src/netlink_delinearize.c:660:3: warning: passing argument 1 of
> ‘expr-><U 390>.<Ua8e8>.left->ops->pctx_update’ from incompatible
> pointer type [enabled by default]
> src/netlink_delinearize.c:660:3: note: expected ‘struct proto_ctx *’
> but argument is of type ‘struct rule_pp_ctx *’
> [...]
>
> The last commit I have in my local tree is:
>
> * 01cd6fa (HEAD, origin/next-3.14, next-3.14) Merge remote-tracking
> branch 'origin/master' into next-3.14
Thanks, for some reason gcc didn't warn me about this. I just pushed
this patch to fix this:
commit 488196551e5e34af3df5d92358f3efa5a08f5730
Author: Patrick McHardy <kaber@trash.net>
Date: Thu Jan 9 21:59:29 2014 +0000
netlink_delinearize: fix compiler warning
src/netlink_delinearize.c: In function ‘meta_match_postprocess’:
src/netlink_delinearize.c:660:3: warning: passing argument 1 of ‘expr->left->ops->pctx_update’ from incompatible pointer type [enabled by default]
src/netlink_delinearize.c:660:3: note: expected ‘struct proto_ctx *’ but argument is of type ‘struct rule_pp_ctx *’
Signed-off-by: Patrick McHardy <kaber@trash.net>
diff --git a/src/netlink_delinearize.c b/src/netlink_delinearize.c
index 5a6cbfa..8f6ee38 100644
--- a/src/netlink_delinearize.c
+++ b/src/netlink_delinearize.c
@@ -657,7 +657,7 @@ static void meta_match_postprocess(struct rule_pp_ctx *ctx,
switch (expr->op) {
case OP_EQ:
- expr->left->ops->pctx_update(ctx, expr);
+ expr->left->ops->pctx_update(&ctx->pctx, expr);
if (ctx->pbase == PROTO_BASE_INVALID &&
left->flags & EXPR_F_PROTOCOL)
--
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
next prev parent reply other threads:[~2014-01-09 22:01 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-08 13:08 [PATCH 00/12] nftables: generic protocol contexts, "inet" family Patrick McHardy
2014-01-08 13:08 ` [PATCH 01/12] expr: replace PAYLOAD_PROTOCOL_EXPR by generic flag Patrick McHardy
2014-01-08 13:08 ` [PATCH 02/12] nftables: generic procotol contexts Patrick McHardy
2014-01-08 13:08 ` [PATCH 03/12] expr: add protocol context update callback Patrick McHardy
2014-01-08 13:08 ` [PATCH 04/12] proto: add helper function to update protocol context Patrick McHardy
2014-01-08 13:08 ` [PATCH 05/12] proto: add debugging for protocol context updates Patrick McHardy
2014-01-08 13:08 ` [PATCH 06/12] ct expr: protocol context updates and dynamic typing Patrick McHardy
2014-01-08 13:08 ` [PATCH 07/12] include: resync nftables.h with kernel Patrick McHardy
2014-01-08 13:08 ` [PATCH 08/12] nftables: add support for the "inet" family Patrick McHardy
2014-01-08 13:09 ` [PATCH 09/12] netlink_delinearize: remove implied meta expressions Patrick McHardy
2014-01-09 21:48 ` Arturo Borrero Gonzalez
2014-01-09 22:01 ` Patrick McHardy [this message]
2014-01-08 13:09 ` [PATCH 10/12] proto: add support for meta templates Patrick McHardy
2014-01-08 13:09 ` [PATCH 11/12] meta: add nfproto support Patrick McHardy
2014-01-08 13:09 ` [PATCH 12/12] meta: add l4proto support Patrick McHardy
-- strict thread matches above, loose matches on Subject: below --
2014-01-06 17:27 [RFC PATCH 00/12] nftables: generic protocol contexts, "inet" family support Patrick McHardy
2014-01-06 17:27 ` [PATCH 09/12] netlink_delinearize: remove implied meta expressions Patrick McHardy
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=20140109220106.GA11124@macbook.localnet \
--to=kaber@trash.net \
--cc=arturo.borrero.glez@gmail.com \
--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 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.