From: Florian Westphal <fw@strlen.de>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: Florian Westphal <fw@strlen.de>, netfilter-devel@vger.kernel.org
Subject: Re: nft typeof keywork patch
Date: Fri, 15 Sep 2017 13:02:43 +0200 [thread overview]
Message-ID: <20170915110243.GA27110@breakpoint.cc> (raw)
In-Reply-To: <20170913154318.GA4681@salvia>
> > Wait, so
> > nft add set ip filter set1 { typeof ip saddr;}
> >
> > then it should not list
> > nft add set ip filter set1 { type ipv4_addr;}
> >
> > but the exact input using the typeof()?
> >
> > I wonder how to encode this, especially given we also need to support
> > concatenation, e.g.
I've started with this, first item i am working on is to change
struct set to pass in struct expr *key instead of datatype+len to make
the original expression (meta iifname for example) available to the
linerize parts so we can stash this info in the udata.
For "typeof(meta iifname) . mark" case the parser will generate a concat
expression, and, since these keep the original expr around we can
iterate over that list to get back the original expressions.
For the normal 'type' case, i think we can simply use a dummy
constant expression to serve as a container for the data type.
What do you think?
next prev parent reply other threads:[~2017-09-15 11:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20170912172527.GC25977@breakpoint.cc>
[not found] ` <20170913115823.GA2297@salvia>
2017-09-13 15:27 ` nft typeof keywork patch Florian Westphal
2017-09-13 15:43 ` Pablo Neira Ayuso
2017-09-15 11:02 ` Florian Westphal [this message]
2017-09-15 11:26 ` 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=20170915110243.GA27110@breakpoint.cc \
--to=fw@strlen.de \
--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 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).