From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Robert White <rwhite@pobox.com>
Cc: netfilter@vger.kernel.org
Subject: Re: Are "device chains" a real thing?
Date: Wed, 8 Feb 2017 10:05:28 +0100 [thread overview]
Message-ID: <20170208090528.GA2054@salvia> (raw)
In-Reply-To: <43d968b3-03a8-1872-63bf-5bedad33ecba@pobox.com>
On Tue, Feb 07, 2017 at 10:18:32PM +0000, Robert White wrote:
> Howdy,
>
> So the manual page for nft says:
>
> {add} chain [family] {table} {chain} {hook} {priority} {policy} {device}
>
> Is that last stanza "{device}" a typo?
>
> If not, what is the syntax and applicability?
Yes. There is a new family, the so-called 'netdev', currently with one
single hook at ingress.
This comes way before than prerouting, and you can use it to classify
traffic earlier.
# nft add table netdev x
# nft add chain netdev x y { type filter hook ingress device eth0 priority 0\; }
There you see anything entering the 'eth0' device, this includes ARP
and both IPv4 and IPv6 traffic, in a nutshell, it's a new hook that
allows you to classify traffic just after the nic driver passes up the
packet to the stack.
This is basically providing an alternative to tc ingress.
We should fix the manual page syntax BTW, it is a bit misleading.
next prev parent reply other threads:[~2017-02-08 9:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-07 22:18 Are "device chains" a real thing? Robert White
2017-02-08 9:05 ` Pablo Neira Ayuso [this message]
2017-02-08 17:15 ` Robert White
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=20170208090528.GA2054@salvia \
--to=pablo@netfilter.org \
--cc=netfilter@vger.kernel.org \
--cc=rwhite@pobox.com \
/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