From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Florian Westphal <fw@strlen.de>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH -next] netfilter: meta: add support for setting skb->pkttype
Date: Wed, 9 Dec 2015 23:54:08 +0100 [thread overview]
Message-ID: <20151209225408.GA3086@salvia> (raw)
In-Reply-To: <1449158201-23868-1-git-send-email-fw@strlen.de>
On Thu, Dec 03, 2015 at 04:56:41PM +0100, Florian Westphal wrote:
> This allows to redirect bridged packets to local machine.
>
> ether type ip ether daddr set aa:53:08:12:34:56 meta pkttype set unicast
>
> Without 'set unicast', ip stack discards PACKET_OTHERHOST skbs.
>
> Signed-off-by: Florian Westphal <fw@strlen.de>
> ---
> Hi Patrick,
>
> as discussed this adds meta set support for pkttype.
>
> I'm not sure how restricted it should be; this only allows
> changing PACKET_OTHERHOST to something else, but I'm not sure
> if this should do more checks on value (e.g. only allow
> PACKET_HOST?) or even less (e.g. also allow mangling
> mcast and the like?).
>
> It only allows NETDEV and BRIDGE families but thats mainly
> because the other ones make no sense (PACKET_OTHERHOST
> cannot happen w. IPV4, 6, INET since stack already drops them earlier).
With a 'hash' expression and this mangling, we can emulate the cluster
match (hence its CLUSTERIP target predecesor too).
If mangling doesn't crash the kernel, ie. nonsense configuration just
results in a drop, then I would make no restrictions.
next prev parent reply other threads:[~2015-12-09 22:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-03 15:56 [PATCH -next] netfilter: meta: add support for setting skb->pkttype Florian Westphal
2015-12-09 22:54 ` Pablo Neira Ayuso [this message]
2015-12-10 1:41 ` Florian Westphal
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=20151209225408.GA3086@salvia \
--to=pablo@netfilter.org \
--cc=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.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).