From: Stefano Brivio <sbrivio@redhat.com>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netfilter-devel@vger.kernel.org,
"Florian Westphal" <fw@strlen.de>,
"Kadlecsik József" <kadlec@blackhole.kfki.hu>,
"Eric Garver" <eric@garver.life>, "Phil Sutter" <phil@nwl.cc>
Subject: Re: [PATCH nft v4 3/4] src: Add support for concatenated set ranges
Date: Mon, 10 Feb 2020 16:09:10 +0100 [thread overview]
Message-ID: <20200210160910.28763684@redhat.com> (raw)
In-Reply-To: <20200207111811.rybiyyacprywswig@salvia>
On Fri, 7 Feb 2020 12:18:11 +0100
Pablo Neira Ayuso <pablo@netfilter.org> wrote:
> On Thu, Jan 30, 2020 at 01:16:57AM +0100, Stefano Brivio wrote:
> > diff --git a/src/evaluate.c b/src/evaluate.c
> > index 55591f5f3526..208250715e1f 100644
> > --- a/src/evaluate.c
> > +++ b/src/evaluate.c
> > @@ -136,6 +136,11 @@ static int byteorder_conversion(struct eval_ctx *ctx, struct expr **expr,
> >
> > if ((*expr)->byteorder == byteorder)
> > return 0;
> > +
> > + /* Conversion for EXPR_CONCAT is handled for single composing ranges */
> > + if ((*expr)->etype == EXPR_CONCAT)
> > + return 0;
>
> Are you also sure this is correct?
Yes, I think so: if we add a set with a concatenation of three
elements, byteorder_conversion() will be called three times with
(*expr)->etype == EXPR_VALUE (which is what we might actually need to
convert), and then once with EXPR_CONCAT, for which we have nothing to
do.
> This code was probably not exercised before with non-range
> concatenations.
I've seen it called for ranges in general. Do you mean we'd never get
past:
if ((*expr)->byteorder == byteorder)
return 0;
?
--
Stefano
next prev parent reply other threads:[~2020-02-10 15:09 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-30 0:16 [PATCH nft v4 0/4] Introduce support for concatenated ranges Stefano Brivio
2020-01-30 0:16 ` [PATCH nft v4 1/4] include: resync nf_tables.h cache copy Stefano Brivio
2020-02-07 10:25 ` Pablo Neira Ayuso
2020-01-30 0:16 ` [PATCH nft v4 2/4] src: Add support for NFTNL_SET_DESC_CONCAT Stefano Brivio
2020-02-07 10:25 ` Pablo Neira Ayuso
2020-01-30 0:16 ` [PATCH nft v4 3/4] src: Add support for concatenated set ranges Stefano Brivio
2020-02-07 10:33 ` Pablo Neira Ayuso
2020-02-10 15:08 ` Stefano Brivio
2020-02-07 11:18 ` Pablo Neira Ayuso
2020-02-10 15:09 ` Stefano Brivio [this message]
2020-01-30 0:16 ` [PATCH nft v4 4/4] tests: Introduce test for set with concatenated ranges Stefano Brivio
2020-02-06 10:14 ` Phil Sutter
2020-02-07 10:34 ` Pablo Neira Ayuso
2020-02-10 15:08 ` Stefano Brivio
2020-02-10 15:51 ` Phil Sutter
2020-02-10 16:04 ` Florian Westphal
2020-02-10 16:16 ` Stefano Brivio
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=20200210160910.28763684@redhat.com \
--to=sbrivio@redhat.com \
--cc=eric@garver.life \
--cc=fw@strlen.de \
--cc=kadlec@blackhole.kfki.hu \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
--cc=phil@nwl.cc \
/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.