All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netfilter-devel@vger.kernel.org, arturo.borrero.glez@gmail.com
Subject: Re: [PATCH nf-next 3/4] netfilter: move generic TEE code from xtables to nf_tee_ipv{4,6} modules
Date: Wed, 17 Jun 2015 08:05:09 +0200	[thread overview]
Message-ID: <20150617060508.GA29344@acer.localdomain> (raw)
In-Reply-To: <20150616163746.GA8748@salvia>

On 16.06, Pablo Neira Ayuso wrote:
> On Tue, Jun 16, 2015 at 06:33:46PM +0200, Pablo Neira Ayuso wrote:
> > Hi Patrick,
> > 
> > I'd appreciate your feedback on some small design issue on TEE for
> > nftables.
> > 
> > Basically, the initial patcheset allows this:
> > 
> >         nft add rule ... tee gateway 1.2.3.4
> > 
> > and
> >         nft add rule ... tee oifname eth0 gateway 1.2.3.4
> > 
> > then, internally, this takes a NFTA_TEE_GATEWAY attribute that
> > contains the inet address.
> > 
> > The question is if it's worth passing a register instead to indicate
> > the gateway, ie. NFTA_TEE_GATEWAY_SREG. Thus, we can use maps to set
> > this, eg.
> > 
> >     nft add rule ... tee gateway ip saddr map { 4.3.2.1 : 1.2.3.4 }
> > 
> > Then, we have interfaces, but we actually need to subscribe to netdev
> > events to make sure the pointer to net_device is still valid.
> 
> I mean, the mapping with interface would be a bit more complicated
> given that we need to subscribe to then, because using the name +
> lookup by name per packet seems may result expensive if the number of
> interfaces is high.
> 
> > Do you think it's worth the effort? I've been spinning on this when I
> > remember about nft_queue and I think it would be good to get support
> > done so we can use maps there too.
> > 
> > Let me know, thanks!

I think the current TEE target uses a notifier to keep the ifindex up
to date, but it is optional in any case. I don't see what difference
it makes to support maps for the addresses, we could still have 
either no or just a single interface specified.

The more complicated thing would be combinations of interfaces and
addresses in a map. But you're not thinking about that, right?

  reply	other threads:[~2015-06-17  6:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-12 11:59 [PATCH nf-next 2/4] netfilter: xt_TEE: always allocate private area Pablo Neira Ayuso
2015-06-12 11:59 ` =?y?q?=5BPATCH=20nf-next=203/4=5D=20netfilter=3A=20move=20generic=20TEE=20code=20from=20xtables=20to=20nf=5Ftee=5Fipv=7B4=2C6=7D=20modules?= Pablo Neira Ayuso
2015-06-16 16:33   ` [PATCH nf-next 3/4] netfilter: move generic TEE code from xtables to nf_tee_ipv{4,6} modules Pablo Neira Ayuso
2015-06-16 16:37     ` Pablo Neira Ayuso
2015-06-17  6:05       ` Patrick McHardy [this message]
2015-06-12 11:59 ` [PATCH nf-next 4/4] netfilter: nf_tables: add nft_tee expression 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=20150617060508.GA29344@acer.localdomain \
    --to=kaber@trash.net \
    --cc=arturo.borrero.glez@gmail.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.