summaryrefslogtreecommitdiffstats
path: root/src/statement.c
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2017-02-03 15:22:28 +0100
committerFlorian Westphal <fw@strlen.de>2017-02-05 22:01:04 +0100
commit4ae0b6dc90d16b4d93a4e8b6703f23dcf2467b85 (patch)
treefa42220b6a574303f96148cab8d6d4a9cdd93843 /src/statement.c
parent31148d448fa55c8a2793d40e7ff77ff07f0eb8cc (diff)
statement: fix print of ip dnat address
the change causes non-ipv6 addresses to not be printed at all in case a nfproto was given. Also add a test case to catch this. Closes: https://bugzilla.netfilter.org/show_bug.cgi?id=1117 Fixes: 5ab0e10fc6e2c22363a ("src: support for RFC2732 IPv6 address format with brackets") Signed-off-by: Florian Westphal <fw@strlen.de> Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/statement.c')
-rw-r--r--src/statement.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/statement.c b/src/statement.c
index 9cdabbb9..3beb86ab 100644
--- a/src/statement.c
+++ b/src/statement.c
@@ -508,6 +508,8 @@ static void nat_stmt_print(const struct stmt *stmt)
printf("]-[");
expr_print(stmt->nat.addr->right);
printf("]");
+ } else {
+ expr_print(stmt->nat.addr);
}
} else {
expr_print(stmt->nat.addr);