From: Phil Sutter <phil@nwl.cc>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: Florian Westphal <fw@strlen.de>, Lukas Wunner <lukas@wunner.de>,
Jozsef Kadlecsik <kadlec@netfilter.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Laura Garcia Liebana <nevola@gmail.com>,
Alexei Starovoitov <ast@kernel.org>,
coreteam@netfilter.org, netfilter-devel@vger.kernel.org,
Thomas Graf <tgraf@suug.ch>
Subject: Re: [netfilter-core] [PATCH nft v4] src: Support netdev egress hook
Date: Mon, 25 Jan 2021 16:02:50 +0100 [thread overview]
Message-ID: <20210125150250.GK3158@orbyte.nwl.cc> (raw)
In-Reply-To: <20210125143157.GA11062@salvia>
Hi,
On Mon, Jan 25, 2021 at 03:31:57PM +0100, Pablo Neira Ayuso wrote:
> On Mon, Jan 25, 2021 at 02:44:32PM +0100, Phil Sutter wrote:
> > On Mon, Jan 25, 2021 at 02:34:05PM +0100, Florian Westphal wrote:
> > > Phil Sutter <phil@nwl.cc> wrote:
> > > > > diff --git a/tests/py/inet/ip.t.payload.netdev b/tests/py/inet/ip.t.payload.netdev
> > > > > index 95be919..38ed0ad 100644
> > > > > --- a/tests/py/inet/ip.t.payload.netdev
> > > > > +++ b/tests/py/inet/ip.t.payload.netdev
> > > > > @@ -12,3 +12,17 @@ netdev test-netdev ingress
> > > > > [ payload load 6b @ link header + 6 => reg 10 ]
> > > > > [ lookup reg 1 set __set%d ]
> > > > >
> > > > > +# meta protocol ip ip saddr . ip daddr . ether saddr { 1.1.1.1 . 2.2.2.2 . ca:fe:ca:fe:ca:fe }
> > > > > +__set%d test-netdev 3
> > > > > +__set%d test-netdev 0
> > > > > + element 01010101 02020202 fecafeca 0000feca : 0 [end]
> > > > > +netdev test-netdev egress
> > > > > + [ meta load protocol => reg 1 ]
> > > > > + [ cmp eq reg 1 0x00000008 ]
> > > > > + [ meta load iiftype => reg 1 ]
> > > ~~~~~~~
> > >
> > > shouldn't nft add oiftype for egress?
> >
> > Oh, you're right. So I "take everything back and claim the opposite". ;)
> > To cover for the different dependency expressions, we need to introduce
> > hook-specific payload files. :/
>
> I'm planning to generalize iftype to check for iiftype from the
> ingress path and oiftype from the egress path. This check is there to
> make sure this is an ethernet device. This can be done once this hook
> hits net-next.
Maybe a dumb question, but doesn't the meta protocol match suffice? If
not, can it pass while the following iftype check then fails?
Cheers, Phil
next prev parent reply other threads:[~2021-01-26 19:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-24 14:25 [PATCH nft v4] src: Support netdev egress hook Lukas Wunner
2021-01-25 13:22 ` [netfilter-core] " Phil Sutter
2021-01-25 13:34 ` Florian Westphal
2021-01-25 13:44 ` Phil Sutter
2021-01-25 14:31 ` Pablo Neira Ayuso
2021-01-25 15:02 ` Phil Sutter [this message]
2021-01-25 15:53 ` 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=20210125150250.GK3158@orbyte.nwl.cc \
--to=phil@nwl.cc \
--cc=ast@kernel.org \
--cc=coreteam@netfilter.org \
--cc=daniel@iogearbox.net \
--cc=fw@strlen.de \
--cc=kadlec@netfilter.org \
--cc=lukas@wunner.de \
--cc=netfilter-devel@vger.kernel.org \
--cc=nevola@gmail.com \
--cc=pablo@netfilter.org \
--cc=tgraf@suug.ch \
/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