From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Liping Zhang <zlpnobody@163.com>
Cc: netfilter-devel@vger.kernel.org,
Liping Zhang <liping.zhang@spreadtrum.com>
Subject: Re: [PATCH iptables] extensions: libip6t_SNAT/DNAT: add square bracket in xlat output when port is specified
Date: Mon, 5 Sep 2016 19:13:20 +0200 [thread overview]
Message-ID: <20160905171320.GA27213@salvia> (raw)
In-Reply-To: <1472820425-7535-1-git-send-email-zlpnobody@163.com>
On Fri, Sep 02, 2016 at 08:47:05PM +0800, Liping Zhang wrote:
> From: Liping Zhang <liping.zhang@spreadtrum.com>
>
> It is better to add square brackets to ip6 address in nft translation
> output when the port is specified. This is keep consistent with the
> nft syntax.
>
> Before this patch:
> # ip6tables-translate -t nat -A OUTPUT -p tcp -j DNAT --to-destination \
> [123::4]:1
> nft add rule ip6 nat OUTPUT meta l4proto tcp counter dnat to 123::4 :1
> # ip6tables-translate -t nat -A POSTROUTING -p tcp -j SNAT --to-source \
> [123::4-123::8]:1
> nft add rule ip6 nat POSTROUTING meta l4proto tcp counter snat to 123::4-123::8 :1
>
> Apply this patch:
> # ip6tables-translate -t nat -A OUTPUT -p tcp -j DNAT --to-destination \
> [123::4]:1
> nft add rule ip6 nat OUTPUT meta l4proto tcp counter dnat to [123::4]:1
> # ip6tables-translate -t nat -A POSTROUTING -p tcp -j SNAT --to-source \
> [123::4-123::8]:1
> nft add rule ip6 nat POSTROUTING meta l4proto tcp counter snat to [123::4]-[123::8]:1
Applied, thanks!
prev parent reply other threads:[~2016-09-05 17:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-02 12:47 [PATCH iptables] extensions: libip6t_SNAT/DNAT: add square bracket in xlat output when port is specified Liping Zhang
2016-09-05 17:13 ` 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=20160905171320.GA27213@salvia \
--to=pablo@netfilter.org \
--cc=liping.zhang@spreadtrum.com \
--cc=netfilter-devel@vger.kernel.org \
--cc=zlpnobody@163.com \
/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).