Re: [PATCH iptables] extensions: libip6t_SNAT/DNAT: add square bracket in xlat output when port is specified

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Sep 02, 2016 at 08:47:05PM +0800, Liping Zhang wrote:
> From: Liping Zhang <liping.zhang@xxxxxxxxxxxxxx>
> 
> 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!
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux