From: Phil Sutter <phil@nwl.cc>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [nft PATCH 4/5] fib: Support existence check
Date: Fri, 10 Mar 2017 22:41:50 +0100 [thread overview]
Message-ID: <20170310214150.GA19768@orbyte.nwl.cc> (raw)
In-Reply-To: <20170310180725.GB25458@salvia>
Hi,
On Fri, Mar 10, 2017 at 07:07:25PM +0100, Pablo Neira Ayuso wrote:
> On Fri, Mar 10, 2017 at 06:13:52PM +0100, Phil Sutter wrote:
> [...]
> > diff --git a/tests/py/inet/fib.t.payload b/tests/py/inet/fib.t.payload
> > index f5258165384dc..e928a19649133 100644
> > --- a/tests/py/inet/fib.t.payload
> > +++ b/tests/py/inet/fib.t.payload
> > @@ -20,3 +20,13 @@ __map%d test-ip 0
> > ip test-ip prerouting
> > [ fib daddr . iif type => reg 1 ]
> > [ lookup reg 1 set __map%d dreg 0 ]
> > +
> > +# fib daddr oif exists
> > +ip test-ip prerouting
> > + [ fib daddr oif => reg 1 ]
>
> Instead of casting out the flag like this:
>
> @@ -173,7 +173,7 @@ nftnl_expr_fib_snprintf_default(char *buf, size_t size,
> {
> struct nftnl_expr_fib *fib = nftnl_expr_data(e);
> int len = size, offset = 0, ret, i;
> - uint32_t flags = fib->flags;
> + uint32_t flags = fib->flags & ~NFTA_FIB_F_PRESENT;
> static const struct {
> int bit;
> const char *name;
>
> I think it would be better if we have a different fib output for the
> present case, eg.
>
> [ fib daddr oif present => reg 1 ]
Yes, this is a good point! Thanks for suggesting the output format - I
was tempted to adjust it but had no good idea and so left it as-is. And
indeed, exthdr netlink debug output hiding the existence check detail is
ugly as well.
I'll implement the missing bits and then respin, including the man page
patch - so no need to apply it now.
Thanks, Phil
next prev parent reply other threads:[~2017-03-10 21:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-10 17:13 [nft PATCH 0/5] Introduce boolean type and existence checks Phil Sutter
2017-03-10 17:13 ` [nft PATCH 1/5] Introduce boolean datatype and boolean expression Phil Sutter
2017-03-10 17:13 ` [nft PATCH 2/5] exthdr: Add support for exthdr specific flags Phil Sutter
2017-03-10 17:13 ` [nft PATCH 3/5] exthdr: Implement existence check Phil Sutter
2017-03-10 17:13 ` [nft PATCH 4/5] fib: Support " Phil Sutter
2017-03-10 18:07 ` Pablo Neira Ayuso
2017-03-10 21:41 ` Phil Sutter [this message]
2017-03-10 17:13 ` [nft PATCH 5/5] doc: Document boolean type and applications Phil Sutter
2017-03-10 18:14 ` Pablo Neira Ayuso
2017-03-10 18:02 ` [nft PATCH 0/5] Introduce boolean type and existence checks 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=20170310214150.GA19768@orbyte.nwl.cc \
--to=phil@nwl.cc \
--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).