From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Patrick McHardy <kaber@trash.net>
Cc: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>,
netfilter-devel@vger.kernel.org
Subject: Re: [nf_tables PATCH v4 5/5] netfilter: nft_nat: add masquerade support
Date: Thu, 4 Sep 2014 14:40:36 +0200 [thread overview]
Message-ID: <20140904124036.GA16426@salvia> (raw)
In-Reply-To: <20140904122150.GF29395@acer.localdomain>
On Thu, Sep 04, 2014 at 01:21:51PM +0100, Patrick McHardy wrote:
> On Thu, Sep 04, 2014 at 02:07:21PM +0200, Arturo Borrero Gonzalez wrote:
> > This patch adds masquerade support to nft_nat.
> >
> > Note that enum nf_nat_manip_type is replaced by enum nft_nat_types in order
> > to support masquerade.
>
> Is it really worth combining them? We have lots of code churn to move
> them into a single module, and static NAT and masquerading have some
> fundamental differences in the data they need, so now we're adding
> new code to validate all of this, we're adding a new NAT type which
> is actually not a new NAT type but simply a special case of SNAT etc.
>
> Why not simply create a new masquerade expression?
Indeed. We're going to have four unused fields in the nft_nat
expression:
+ enum nft_registers sreg_addr_min:8;
+ enum nft_registers sreg_addr_max:8;
+ enum nft_registers sreg_proto_min:8;
+ enum nft_registers sreg_proto_max:8;
And we can skip the nft_nat per family split that happens in patch 4/5.
I like the idea of the masquerade expression.
next prev parent reply other threads:[~2014-09-04 12:39 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-04 12:06 [nf_tables PATCH v4 1/5] netfilter: nft_nat: include a flag attribute Arturo Borrero Gonzalez
2014-09-04 12:06 ` [nf_tables PATCH v4 2/5] netfilter: nf_nat_masquerade_ipv4: code factorization Arturo Borrero Gonzalez
2014-09-09 9:52 ` Pablo Neira Ayuso
2014-09-04 12:06 ` [nf_tables PATCH v4 3/5] netfilter: nf_nat_masquerade_ipv6: " Arturo Borrero Gonzalez
2014-09-09 9:52 ` Pablo Neira Ayuso
2014-09-04 12:07 ` [nf_tables PATCH v4 4/5] netfilter: nft_nat: split code in AF parts Arturo Borrero Gonzalez
2014-09-04 12:07 ` [nf_tables PATCH v4 5/5] netfilter: nft_nat: add masquerade support Arturo Borrero Gonzalez
2014-09-04 12:21 ` Patrick McHardy
2014-09-04 12:40 ` Pablo Neira Ayuso [this message]
2014-09-04 13:54 ` Arturo Borrero Gonzalez
2014-09-04 14:31 ` Patrick McHardy
2014-09-09 9:50 ` [nf_tables PATCH v4 1/5] netfilter: nft_nat: include a flag attribute Pablo Neira Ayuso
2014-09-09 10:14 ` Arturo Borrero Gonzalez
2014-09-09 11:08 ` 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=20140904124036.GA16426@salvia \
--to=pablo@netfilter.org \
--cc=arturo.borrero.glez@gmail.com \
--cc=kaber@trash.net \
--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).