From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
Cc: Netfilter Development Mailing list
<netfilter-devel@vger.kernel.org>,
Patrick McHardy <kaber@trash.net>
Subject: Re: [nf_tables PATCH v4 1/5] netfilter: nft_nat: include a flag attribute
Date: Tue, 9 Sep 2014 13:08:12 +0200 [thread overview]
Message-ID: <20140909110812.GA13907@salvia> (raw)
In-Reply-To: <CAOkSjBj3e+MFFhtvMOD7cSWHekk_E7s-tJa0SJ80ARWN7EcnGA@mail.gmail.com>
On Tue, Sep 09, 2014 at 12:14:25PM +0200, Arturo Borrero Gonzalez wrote:
> On 9 September 2014 11:50, Pablo Neira Ayuso <pablo@netfilter.org> wrote:
> > On Thu, Sep 04, 2014 at 02:06:14PM +0200, Arturo Borrero Gonzalez wrote:
> >> Both SNAT and DNAT (and the upcoming masquerade) can have additional
> >> configuration parameters, such as port randomization or NAT addressing
> >> persistence.
> >> We can cover these scenarios by simply adding a flag attribute for
> >> userspace to fill when needed.
> >>
> >> The flags to use are defined in include/uapi/linux/netfilter/nf_nat.h,
> >> NF_NAT_RANGE_MAP_IPS
> >> NF_NAT_RANGE_PROTO_SPECIFIED
> >> NF_NAT_RANGE_PROTO_RANDOM
> >> NF_NAT_RANGE_PERSISTENT
> >> NF_NAT_RANGE_PROTO_RANDOM_FULLY
> >> NF_NAT_RANGE_PROTO_RANDOM_ALL
> >>
> >> The caller must take care of not messing up with the flags, as they are
> >> added unconditionally to the final resulting nf_nat_range.
> >
> > Not sure this comment is relevant. Of course, userspace should select
> > the flags accordingly :-). Let me know if the intention was other than
> > insisting on the fact that the flags alter the way the NAT is done.
> >
>
> Yes, I meant that no additional check is done to know if the flags
> combination makes sense.
I see. iptables does exactly the same thing at this moment. At quick
glance I think random flag combinations should not puzzle
nf_nat_setup_info(), but it would be good to give it a closer look.
prev parent reply other threads:[~2014-09-09 11:07 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
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 [this message]
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=20140909110812.GA13907@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).