From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Florian Westphal <fw@strlen.de>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH 4/4] evaluate: reject meta nfproto outside of inet family
Date: Sun, 18 Jun 2017 11:52:37 +0200 [thread overview]
Message-ID: <20170618095237.GA3312@salvia> (raw)
In-Reply-To: <20170616203411.16408-5-fw@strlen.de>
On Fri, Jun 16, 2017 at 10:34:11PM +0200, Florian Westphal wrote:
> diff --git a/src/evaluate.c b/src/evaluate.c
> index 311c86c5abe9..4cbbd5f9b52a 100644
> --- a/src/evaluate.c
> +++ b/src/evaluate.c
> @@ -1691,6 +1691,18 @@ static int expr_evaluate_fib(struct eval_ctx *ctx, struct expr **exprp)
> return expr_evaluate_primary(ctx, exprp);
> }
>
> +static int expr_evaluate_meta(struct eval_ctx *ctx, struct expr **exprp)
> +{
> + struct expr *meta = *exprp;
> +
> + if (ctx->pctx.family != NFPROTO_INET &&
> + meta->flags & EXPR_F_PROTOCOL &&
> + meta->meta.key == NFT_META_NFPROTO)
> + return expr_error(ctx->msgs, meta,
> + "meta nfproto is only useful in the inet family");
Nitpick: Before you push this one, you probably want to mangle this
line to get it aligned with expr_error().
Thanks!
next prev parent reply other threads:[~2017-06-18 9:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-16 20:34 [PATCH nft 0/4] restrict meta nfproto to inet family Florian Westphal
2017-06-16 20:34 ` [PATCH 1/4] tests: restrict ct saddr test " Florian Westphal
2017-06-16 20:34 ` [PATCH 2/4] tests: remove two non-sensical rules Florian Westphal
2017-06-16 20:34 ` [PATCH 3/4] tests: restrict meta nfproto test cases to inet family Florian Westphal
2017-06-16 20:34 ` [PATCH 4/4] evaluate: reject meta nfproto outside of " Florian Westphal
2017-06-18 9:52 ` Pablo Neira Ayuso [this message]
2017-06-18 9:35 ` [PATCH nft 0/4] restrict meta nfproto to " 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=20170618095237.GA3312@salvia \
--to=pablo@netfilter.org \
--cc=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.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).