summaryrefslogtreecommitdiffstats
path: root/extensions/libip6t_DNAT.c
diff options
context:
space:
mode:
authorLiping Zhang <liping.zhang@spreadtrum.com>2016-08-28 16:50:47 +0800
committerPablo Neira Ayuso <pablo@netfilter.org>2016-08-30 11:55:52 +0200
commit89391ea5e3afbb5bb84c137c1f78e8c64b07a954 (patch)
tree865201b302b7c75f972b52dc25ec281cccc09a9e /extensions/libip6t_DNAT.c
parent1d3f29d61b24ae1a41ef9acd3fcbe658a8892b9c (diff)
extensions: libip[6]t_SNAT/DNAT: use the new nft syntax when do xlate
After commit "src: add 'to' for snat and dnat" in nftables tree, we should recommend the end user to use the new syntax. Before this patch: # iptables-translate -t nat -A POSTROUTING -j SNAT --to-source 1.1.1.1 nft add rule ip nat POSTROUTING counter snat 1.1.1.1 # ip6tables-translate -t nat -A PREROUTING -j DNAT --to-destination 2001::1 nft add rule ip6 nat PREROUTING counter dnat 2001::1 Apply this patch: # iptables-translate -t nat -A POSTROUTING -j SNAT --to-source 1.1.1.1 nft add rule ip nat POSTROUTING counter snat to 1.1.1.1 # ip6tables-translate -t nat -A PREROUTING -j DNAT --to-destination 2001::1 nft add rule ip6 nat PREROUTING counter dnat to 2001::1 Signed-off-by: Liping Zhang <liping.zhang@spreadtrum.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'extensions/libip6t_DNAT.c')
-rw-r--r--extensions/libip6t_DNAT.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/extensions/libip6t_DNAT.c b/extensions/libip6t_DNAT.c
index 3925c3bb..97a8b1cb 100644
--- a/extensions/libip6t_DNAT.c
+++ b/extensions/libip6t_DNAT.c
@@ -259,7 +259,7 @@ static int DNAT_xlate(struct xt_xlate *xl,
bool sep_need = false;
const char *sep = " ";
- xt_xlate_add(xl, "dnat ");
+ xt_xlate_add(xl, "dnat to ");
print_range_xlate(range, xl);
if (range->flags & NF_NAT_RANGE_PROTO_RANDOM) {
xt_xlate_add(xl, " random");