[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d5876ef3-bcee-e0b2-273e-e0405fe17b79@iogearbox.net>
Date: Thu, 31 Oct 2019 23:39:58 +0100
From: Daniel Borkmann <daniel@...earbox.net>
To: Lukas Wunner <lukas@...ner.de>
Cc: Pablo Neira Ayuso <pablo@...filter.org>,
Jozsef Kadlecsik <kadlec@...filter.org>,
Florian Westphal <fw@...len.de>,
netfilter-devel@...r.kernel.org, coreteam@...filter.org,
netdev@...r.kernel.org, Martin Mares <mj@....cz>
Subject: Re: [PATCH nf-next,RFC 5/5] netfilter: Introduce egress hook
On 10/31/19 2:41 PM, Lukas Wunner wrote:
> Commit e687ad60af09 ("netfilter: add netfilter ingress hook after
> handle_ing() under unique static key") introduced the ability to
> classify packets on ingress.
>
> Allow the same on egress.
>
> The need for this arose because I had to filter egress packets which do
> not match a specific ethertype. The most common solution appears to be
This seems like a /very/ weak justification for something that sits in
critical fastpath. NAK.
> to enslave the interface to a bridge and use ebtables, but that's
> cumbersome to configure and comes with a (small) performance penalty.
> An alternative approach is tc, but that doesn't afford equivalent
> matching options as netfilter.
Hmm, have you tried tc BPF on the egress hook (via sch_cls_act -> cls_bpf)?
> people have expressed a desire for egress filtering in the past:
>
> https://www.spinics.net/lists/netfilter/msg50038.html
Adding another hook to catch misconfigurations of NAT in postrouting ...?
> https://unix.stackexchange.com/questions/512371
This talks about filtering / limiting ARP packets which can be done today
easily with existing means, including writing ARP responders sitting on tc
ingress/egress hook.
> An egress hook therefore seems like an obvious addition.
>
> Signed-off-by: Lukas Wunner <lukas@...ner.de>
> Cc: Daniel Borkmann <daniel@...earbox.net>
Powered by blists - more mailing lists